Skip to content

[18.0][ADD] endpoint_openapi: document endpoint.mixin endpoints with OpenAPI - #184

Draft
simahawk wants to merge 2 commits into
OCA:18.0from
camptocamp:18-add-endpoint_openapi
Draft

simahawk wants to merge 2 commits into
OCA:18.0from
camptocamp:18-add-endpoint_openapi

Conversation

@simahawk

Copy link
Copy Markdown
Contributor

Depends on

Motivation

Configurable endpoints (endpoint.endpoint, edi.endpoint...) are not documented today, so consumers have to read the code or the records to know what they expose. This module documents them with OpenAPI, from the records themselves, and lists them in the docs viewer. Only enabled endpoints are documented, since some are meant for internal use only.

Key features

  • documents endpoint.endpoint and any model using endpoint.mixin (eg: edi.endpoint)
  • only the endpoints enabled on the record are documented
  • one docs source per model and route group, shown in /openapi/docs
  • no controller of its own: docs come from openapi_doc_viewer

OpenAPI docs for configurable endpoints (any model using `endpoint.mixin`).

* opt-in per endpoint, w/ description, tags and input/output JSON schemas
  (via `openapi.doc.mixin`)
* one docs source per model (category) and route group (app),
  browsable from `/openapi/docs` (`openapi_doc_viewer`)
Pending OCA#183 (openapi_doc_viewer) and OCA#181 (openapi_doc_base).
To be removed once merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants