Closed
Description
It would be quite handy, if multiple sets of OpenAPI could be generated, so each client/service can have their own APIs documented and accessible in the OCS API viewer.
E.g. in Talk we have multiple different API consumers and I would like to document and generate documentation for all of them in one way only:
- "Default" - Talk clients: Android/iOS app, Web, Desktop client
- Bots - https://nextcloud-talk.readthedocs.io/en/latest/bots/#sending-a-chat-message
- Admin APIs - Arguable, but from the HPB, Turn, Sturn, SIP and other management is not really something a normal mobile client should/would implement, yet it's shown in the API docs and a bit confusing, or there is no documentation available for the frontenders that implement the admin settings UI
- Signaling server API - We have some endpoints that only the signaling server can access with a shared secret
- Hosted signaling server API - We have some endpoints that are used when trying to sign up with a hoster of signaling servers
- Recording server API - We have some endpoints that only the recording server can access with a shared secret https://nextcloud-talk.readthedocs.io/en/latest/recording/#store-call-recording
- SIP server API - We have some endpoints that only the recording server can access with a shared secret https://nextcloud-talk.readthedocs.io/en/latest/participant/#get-a-participant-by-their-pin
Proposal
Similar to PHPUnits Group
attribute and the already used IgnoreOpenAPI
, we could also introduce an OpenAPI(scope: XYZ)
attribute.
The openapi-extractor would then group the routes into different files and the ocs-api-viewer would show:
- spreed - All controller methods without
IgnoreOpenAPI
or withOpenAPI
or withOpenAPI(scope: default)
- spreed-admin - All controller methods with
OpenAPI(scope: admin)
- spreed-signaling - All controller methods with
OpenAPI(scope: signaling)
- spreed-recording - All controller methods with
OpenAPI(scope: recording)
- spreed-sip - All controller methods with
OpenAPI(scope: sip)
Depending on the discussion I can also imagine to look into this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment