-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1640 from nextcloud/feat/openapi
Add OpenAPI spec
- Loading branch information
Showing
16 changed files
with
2,101 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: OpenAPI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- stable* | ||
|
||
jobs: | ||
openapi: | ||
runs-on: ubuntu-latest | ||
|
||
if: ${{ github.repository_owner != 'nextcloud-gmbh' }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up php | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
extensions: xml | ||
coverage: none | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Composer install | ||
run: composer i | ||
|
||
- name: OpenAPI checker | ||
run: | | ||
composer exec generate-spec | ||
if [ -n "$(git status --porcelain openapi.json)" ]; then | ||
git diff | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,3 +67,4 @@ nbproject | |
/npm-debug.log | ||
/build | ||
/vendor | ||
/vendor-bin/*/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* @copyright Copyright (c) 2016, ownCloud, Inc. | ||
* | ||
* @author Joas Schilling <[email protected]> | ||
* @author Kate Döen <[email protected]> | ||
* | ||
* @license AGPL-3.0 | ||
* | ||
|
@@ -36,7 +37,13 @@ class Capabilities implements ICapability { | |
/** | ||
* Return this classes capabilities | ||
* | ||
* @return array<string, array<string, array<string>>> | ||
* @return array{ | ||
* notifications: array{ | ||
* ocs-endpoints: string[], | ||
* push: string[], | ||
* admin-notifications: string[], | ||
* }, | ||
* } | ||
*/ | ||
public function getCapabilities(): array { | ||
return [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.