docs/

directory
v1.11.1-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2022 License: Apache-2.0

README

Swagger

This readme contains information related to the Swagger UI for Provenance.

Activation

In order to have the Swagger UI available on your node, it must be turned on in the config.

  1. If the file build/run/provenanced/config/app.toml does not yet exist run this command:
    > make build run-config
    
  2. Open the build/run/provenanced/config/app.toml for editing.
    1. Find the API Configuration section.
    2. In that section, change enable = false to enable = true.
    3. Also in that section, change swagger = false to swagger = true.
  3. Regenerate the swagger files:
    > make update-swagger-docs
    
  4. Rebuild provenance:
    > make build
    
  5. Start the node:
    > make run
    
  6. If you are refreshing the browser, hard refresh: cmd + shift + r

Location

The swagger UI can be found at the /swagger/ path on your node.

For example, if running locally, it will be at http://localhost:1317/swagger/

If you don't get any response (or you get a connection refused):

  1. Make sure it has been activated.
  2. Make sure your firewall is allowing traffic port 1317.
  3. Make sure that port 1317 is still the correct port; it's defined in the app.toml file's [api] section in the address field.

Updating

Any time changes are made to the proto files, the Swagger UI files need to be updated too.

To update the swagger docs:

> make update-swagger-docs

This will update a couple files. Those changes should be committed and included in your PR.

Directories

Path Synopsis
Package statik contains static assets.
Package statik contains static assets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL