Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Preserve query and fragment part of the URI while redirecting for relative paths (swagger doc) #4064

Merged
merged 1 commit into from
Feb 5, 2019

Conversation

Anviking
Copy link
Member

@Anviking Anviking commented Feb 4, 2019

Description

Ported from cardano-wallet c49e93a350e8294a380385258b9232df2d00ac20 to

  • lib/src/Pos/Util/Swagger.hs (for the node monitoring api docs)
  • wallet/src/Cardano/Wallet/API/V1/Swagger.hs (for the wallet docs)

Todo:

  • Update changelog
  • Fill in QA

Linked issue

cardano-foundation/cardano-wallet#299

Type of change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • 🔨 New or improved tests for existing code
  • ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
  • CHANGELOG entry has been added and is linked to the correct PR on GitHub.

QA

Wallet API docs

  1. Build and run a wallet with --wallet-doc-address set
stack exec cardano-node -- --topology=docs/network/example-topologies/mainnet-staging.yaml \
    --configuration-key mainnet_dryrun_full \
    --db-path ../staging-db \
    --tlscert ../tls-certs/server.crt --tlskey ../tls-certs/server.key --tlsca ../tls-certs/ca.crt --no-client-auth --wallet-doc-address         127.0.0.1:8190
  1. Visit https://127.0.0.1:8190/docs/v1/index/#section/Errors

  2. Should load at the Error section

skarmavbild 2019-02-04 kl 22 13 56

Node monitoring API docs

stack build cardano-sl-node --ghc-options=-optl-Wl,-dead_strip_dylibs
stack exec cardano-node-simple -- --topology=wallet/topology-examples/testnet.yaml \
    --configuration-key=mainnet_staging_short_epoch_full \
    --log-config=log-configs/cluster.yaml       \
    --node-api-address           127.0.0.1:8080 \
    --node-doc-address           127.0.0.1:8180 \
                                                \
    --tlsca       scripts/tls-files/ca.crt      \
    --tlscert     scripts/tls-files/server.crt  \
    --tlskey      scripts/tls-files/server.key  \
  1. Visit https://127.0.0.1:8180/docs/v1/index/#tag/Settings

skarmavbild 2019-02-05 kl 14 05 32

Note: endpoints without tags don't work, but this is a separate issue. See cardano-foundation/cardano-wallet#306.

How to merge

Send the message bors r+ to merge this PR. For more information, see
docs/how-to/bors.md.

…ative paths (swagger doc)

Ported from cardano-wallet c49e93a350e8294a380385258b9232df2d00ac20 to
- lib/src/Pos/Util/Swagger.hs (for the node monitoring api docs)
- wallet/src/Cardano/Wallet/API/V1/Swagger.hs (for the wallet docs)

Co-authored-by: Matthias Benkort <matthias.benkort@gmail.com>
@KtorZ
Copy link
Contributor

KtorZ commented Feb 5, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 5, 2019
4064: Preserve query and fragment part of the URI while redirecting for relative paths (swagger doc) r=KtorZ a=Anviking

## Description

<!--- A brief description of this PR and the problem is trying to solve -->

Ported from cardano-wallet c49e93a350e8294a380385258b9232df2d00ac20 to
- lib/src/Pos/Util/Swagger.hs (for the node monitoring api docs)
- wallet/src/Cardano/Wallet/API/V1/Swagger.hs (for the wallet docs)

### Todo:
- [x] Update changelog
- [x] Fill in QA

## Linked issue

cardano-foundation/cardano-wallet#299



Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 5, 2019

@iohk-bors iohk-bors bot merged commit 9b20e42 into develop Feb 5, 2019
@iohk-bors iohk-bors bot deleted the anviking/docs branch February 5, 2019 15:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants