Documentation/contribution/openapi.md
The OpenAPI specification has moved from openapi.yaml to the openapi.json
and openapi.yaml files in httptransport/api/v1.
These files are autogenerated from files in httptransport/api and
httptransport/types via the httptransport/api/openapi.zsh script. This
script requires zsh to run and sha256sum, git, jq, yq, and npx
commands in PATH.
To modify the OpenAPI spec, edit the relevant httptransport/api/*/openapi.jq
file (a jq script) or the httptransport/api/lib/oapi.jq library as needed,
then run go generate ./httptransport.
The go generate command also needs to be run if files in httptransport/types
are modified.
The openapi.zsh script works by:
v* directory under httptransport/api:
httptransport/types/v* directory:
examples fileopenapi.jq script with null inputyaml representationsha256 checksum in Etag formatThe OpenAPI spec should also be validated or linted, but there's not a known tool that handles JSON Schema reference resolution correctly. ↩