We always return YAML at the moment.
Document how the output of /api/schema/ can be changed by passing in different Accept headers:
- YAML: application/vnd.oai.openapi (also the default)
- JSON: application/vnd.oai.openapi+json
We always return YAML at the moment.
Document how the output of /api/schema/ can be changed by passing in different Accept headers:
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | bd808 | T275907 Start creating end-user help for Toolhub on meta | |||
Duplicate | None | T275805 Document how to get OpenAPI spec in JSON format |
It already works, I just had to read the documentation. :)
$ curl -H 'Accept: application/vnd.oai.openapi+json' 'localhost:8000/api/schema/' { "openapi": "3.0.3", "info": { "title": "Toolhub API", "version": "0.0.1", "license": { "name": "GPL-3.0-or-later", "url": "https://www.gnu.org/licenses/gpl-3.0.html" } }, ...