Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,7 @@ License: CC0-1.0
Files: apps/theming/fonts/OpenDyslexic-Bold.otf apps/theming/fonts/OpenDyslexic-Regular.otf
Copyright: 2012-2019 Abbie Gonzalez <https://abbiecod.es|[email protected]>, with Reserved Font Name OpenDyslexic.
License: OFL-1.1-RFN

Files: openapi.json
Copyright: 2025 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-or-later
1 change: 1 addition & 0 deletions build/files-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
'occ',
'ocs',
'ocs-provider',
'openapi.json',
'package-lock.json',
'package.json',
'psalm-ncu.xml',
Expand Down
15 changes: 14 additions & 1 deletion build/openapi-checker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,26 @@
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

specs=()
for path in core apps/*; do
if [ ! -f "$path/.noopenapi" ] && [[ "$(git check-ignore "$path")" != "$path" ]]; then
composer exec generate-spec "$path" "$path/openapi.json" || exit 1
if [[ "$(basename "$path")" != "core" ]]; then
if [ -f "$path/openapi-full.json" ]; then
specs+=("$path/openapi-full.json")
else
specs+=("$path/openapi.json")
fi;
fi;
fi
done

files="$(git diff --name-only)"
composer exec merge-specs -- \
--core core/openapi-full.json \
--merged openapi.json \
"${specs[@]}"

files="$(git ls-files --exclude-standard --modified --others)"
changed=false
for file in $files; do
if [[ $file == *"openapi"*".json" ]]; then
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
"test": "phpunit --configuration tests/phpunit-autotest.xml",
"test:db": "@composer run test -- --group DB,SLOWDB",
"test:files_external": "phpunit --configuration tests/phpunit-autotest-external.xml",
"rector": "rector --config=build/rector.php && composer cs:fix"
"rector": "rector --config=build/rector.php && composer cs:fix",
"openapi": "./build/openapi-checker.sh"
},
"extra": {
"bamarni-bin": {
Expand Down
Loading
Loading