Skip to content

Commit 30c1c7b

Browse files
committed
feat(openapi): Generate merged spec for all apps
Signed-off-by: provokateurin <[email protected]>
1 parent 3732be5 commit 30c1c7b

File tree

2 files changed

+30715
-0
lines changed

2 files changed

+30715
-0
lines changed

build/openapi-checker.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,25 @@
33
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
44
# SPDX-License-Identifier: AGPL-3.0-or-later
55

6+
specs=()
67
for path in core apps/*; do
78
if [ ! -f "$path/.noopenapi" ] && [[ "$(git check-ignore "$path")" != "$path" ]]; then
89
composer exec generate-spec "$path" "$path/openapi.json" || exit 1
10+
if [[ "$(basename "$path")" != "core" ]]; then
11+
if [ -f "$path/openapi-full.json" ]; then
12+
specs+=("$path/openapi-full.json")
13+
else
14+
specs+=("$path/openapi.json")
15+
fi;
16+
fi;
917
fi
1018
done
1119

20+
composer exec merge-specs -- \
21+
--core core/openapi-full.json \
22+
--merged openapi.json \
23+
"${specs[@]}"
24+
1225
files="$(git ls-files --exclude-standard --modified --others)"
1326
changed=false
1427
for file in $files; do

0 commit comments

Comments
 (0)