api/README.md
This module provides a REST API for client applications to query the Aptos blockchain.
See spec source:
With our API setup, the spec files (api/doc/spec.yaml / api/doc/spec.json) are generated from the API in code. We have CI that ensures that all of these are updated together. As such, if you want to make a change to the API, do it in this order:
This process updates the docs at:
All commands here are relative to the root of aptos-core.
api/src/..yaml and .json files by running these commands from the root of aptos-core:cargo run -p aptos-openapi-spec-generator -- -f yaml -o api/doc/spec.yaml
cargo run -p aptos-openapi-spec-generator -- -f json -o api/doc/spec.json
Double check that the spec looks good by running these commands and then visit http://127.0.0.1:8888/spec.html.
cd api/
make serve