No description
Find a file
github-actions[bot] b5265e3dad
Merge pull request #303 from nextcloud/automated/noid/main-update-nextcloud-ocp
[main] Update nextcloud/ocp dependency
2025-12-21 03:40:59 +00:00
.github ci(deps): Bump peter-evans/create-pull-request in /.github/workflows 2025-12-20 02:21:06 +00:00
bin fix(bin): Call correct script in merge-specs 2025-03-17 07:59:19 +01:00
LICENSES ci: Add reuse action 2024-09-15 16:18:45 +02:00
src refactor: Apply rector refactorings 2025-12-02 09:30:02 +01:00
tests fix(openapi): Don't mark unknown default values as required 2025-11-27 08:58:30 +01:00
.editorconfig chore: Add SPDX header 2024-09-15 16:17:47 +02:00
.gitignore chore: Add SPDX header 2024-09-15 16:17:47 +02:00
.php-cs-fixer.dist.php refactor: Use separate bin files to allow adding .php extension to all files 2024-11-13 14:31:12 +01:00
AUTHORS.md chore: Add SPDX header 2024-09-15 16:17:47 +02:00
CHANGELOG.md chore: Add SPDX header 2024-09-15 16:17:47 +02:00
composer.json build(deps-dev): Bump dev dependencies 2025-11-27 09:29:18 +01:00
composer.lock chore(dev-deps): Bump nextcloud/ocp package 2025-12-21 02:53:52 +00:00
generate-spec.php refactor: Apply rector refactorings 2025-12-02 09:30:02 +01:00
LICENSE Initial commit 2022-11-04 18:04:21 +01:00
merge-specs.php refactor: Apply rector refactorings 2025-05-15 10:26:36 +02:00
README.md docs: Add reuse status badge 2024-09-15 16:23:35 +02:00
rector.php refactor: Apply rector refactorings 2025-12-02 09:30:02 +01:00
REUSE.toml chore: Add SPDX header 2024-09-15 16:17:47 +02:00

openapi-extractor

REUSE status

Installation

composer require --dev nextcloud/openapi-extractor

To avoid dependency and PHP version conflicts it is best to install the package to vendor-bin using https://github.com/bamarni/composer-bin-plugin instead.

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.