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.
- If the file
build/run/provenanced/config/app.toml
does not yet exist run this command:
> make build run-config
- Open the
build/run/provenanced/config/app.toml
for editing.
- Find the
API Configuration
section.
- In that section, change
enable = false
to enable = true
.
- Also in that section, change
swagger = false
to swagger = true
.
- Regenerate the swagger files:
> make update-swagger-docs
- Rebuild provenance:
> make build
- Start the node:
> make run
- 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):
- Make sure it has been activated.
- Make sure your firewall is allowing traffic port
1317
.
- 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.