Float API docs
Jekyll site plus a Swagger UI API reference (OpenAPI/Swagger 2.0, swagger-ui v2.2.8). See README.md for the full guide.
Layout
swagger-api-v3.yaml: entry point. Holds tags, shared parameters and thepathsthat$refintopaths/*.yaml.paths/<endpoint>.yaml: models (definitions) and operations per endpoint._data/sidebar.yml: sidebar entries. Order must match the tag order inswagger-api-v3.yaml.pages/overview/overview_changelog.md: API changelog.pages/tutorial/: tutorials.
Checks before finishing any API reference change
- Run
npx --yes @apidevtools/swagger-cli validate ./swagger-api-v3.yamland fix any errors. This is also on the PR checklist. - Swagger 2.0 does not support null types. Never use
example: nullortype: "null". Give a realistic example value and say in the description that the value can benull. - Check every new or changed field against the API behaviour in the
api3repo (../api3, checkorigin/develop), not just the ticket. Flag any difference rather than guessing. - Mark fields the API ignores on write as
readOnly: true. Do not document fields that are internal or being removed. - Document the error responses an operation can return (404 for a missing resource, 422 for validation failure).
Adding a new endpoint
- Add
paths/<name>.yamlwith a tagged definition. - In
swagger-api-v3.yaml, add the tag (grouped by entity, per the README) and thepathsentries. - Add the sidebar entry in
_data/sidebar.yml.
Changelog
- Add an entry under the current month in
pages/overview/overview_changelog.mdfor anything that changes the API or docs. Use “Docs only:” for documentation-only changes. - Announce breaking changes under “Upcoming changes” 2-4 weeks ahead.
- Follow the wording in the ticket, for example early-access notes and anything it says not to mention (such as Plans).
Conventions
- Branch names come from the Linear ticket (
feature/pint-<n>-...). - Commit messages are
docs: <summary>and finish with the ticket ID. - When creating a PR, always use the template in
.github/pull_request_template.md. Fill in every section, link the Linear ticket, and tick only the checklist items that were actually done. - Match the existing style: double-quoted strings, 2-space indentation, and the pagination headers copied from existing list endpoints.