Float API docs

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 the paths that $ref into paths/*.yaml.
  • paths/<endpoint>.yaml: models (definitions) and operations per endpoint.
  • _data/sidebar.yml: sidebar entries. Order must match the tag order in swagger-api-v3.yaml.
  • pages/overview/overview_changelog.md: API changelog.
  • pages/tutorial/: tutorials.

Checks before finishing any API reference change

  1. Run npx --yes @apidevtools/swagger-cli validate ./swagger-api-v3.yaml and fix any errors. This is also on the PR checklist.
  2. Swagger 2.0 does not support null types. Never use example: null or type: "null". Give a realistic example value and say in the description that the value can be null.
  3. Check every new or changed field against the API behaviour in the api3 repo (../api3, check origin/develop), not just the ticket. Flag any difference rather than guessing.
  4. Mark fields the API ignores on write as readOnly: true. Do not document fields that are internal or being removed.
  5. Document the error responses an operation can return (404 for a missing resource, 422 for validation failure).

Adding a new endpoint

  1. Add paths/<name>.yaml with a tagged definition.
  2. In swagger-api-v3.yaml, add the tag (grouped by entity, per the README) and the paths entries.
  3. Add the sidebar entry in _data/sidebar.yml.

Changelog

  • Add an entry under the current month in pages/overview/overview_changelog.md for 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.