:::tip
Apache Answer using swagger to generate API document automatically. Swagger can display the API document in a friendly way, and can also provide a convenient way to test the API.
:::
If you want to quickly view the API document, you can visit the following link: https://meta.answer.dev/swagger/index.html
If you already have an Apache Answer instance, you can view the API document of your own instance by visiting the following link: https://example.com/swagger/index.html
If you can't access the above link, please check the following configuration items whether they are configured correctly.
swaggerui: show: true protocol: http host: 127.0.0.1 address: ':9080' # leave blank to use the 80 port number
Apache Answer using swag to generate API document json/yaml file automatically according to the comments in the code. You can use the following steps to generate API document.
# install swag cli $ go install github.com/swaggo/swag/cmd/swag@latest # enter the project root directory and execute the following command $ cd script $ ./gen-api.sh # the generated documentation is in the docs/api directory