nextcloud / openapi-extractor
A tool for extracting OpenAPI specifications from Nextcloud source code
Installs: 11 078
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 3
Requires
- php: ^8.1
- ext-simplexml: *
- adhocore/cli: ^1.7
- nikic/php-parser: ^5.0
- phpstan/phpdoc-parser: ^1.28
Requires (Dev)
- nextcloud/coding-standard: ^1.2
- nextcloud/ocp: dev-master
This package is auto-updated.
Last update: 2024-09-14 01:46:31 UTC
README
Installation
This tool should be added as a dev dependency to the composer.json
of your app (or in your vendor-bin
) like this:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/nextcloud/openapi-extractor" } ], "require-dev": { "nextcloud/openapi-extractor": "dev-main" } }
Create a CI workflow to check the specifications are up-to-date
The Workflow template repository has a template available: https://github.com/nextcloud/.github/blob/master/workflow-templates/openapi.yml
Afterward in your repository settings set the OpenAPI workflow to be required for merging pull requests.
Usage
Checkout the OpenAPI tutorial at https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-openapi.html to see how you can use openapi-extractor.
🐢 Performance
Make sure that you have xdebug turned off when generating OpenAPI specs, otherwise it can take multiple minutes instead of seconds.