diff --git a/.cspell/tools.txt b/.cspell/tools.txt index fbe515cd209..37cb3681758 100644 --- a/.cspell/tools.txt +++ b/.cspell/tools.txt @@ -30,6 +30,7 @@ icudtl inkscape intellij jetbrains +jsonpatch jvmargs klass lcov diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c67f9620b6..001621e9784 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,6 +13,7 @@ Note that you need to have Dart installed and [`~/.pub-cache/bin/` needs to be i You will need to have the following packages installed: - [yq](https://github.com/kislyuk/yq) +- [jsonpatch](https://pypi.org/project/jsonpatch) - [sqlite3](https://pub.dev/packages/sqflite_common_ffi#getting-started) - [appindicator3](https://pub.dev/packages/tray_manager#quick-start) diff --git a/tool/generate-specs.sh b/tool/generate-specs.sh index 3680fea0c75..dba89f42428 100755 --- a/tool/generate-specs.sh +++ b/tool/generate-specs.sh @@ -50,6 +50,14 @@ done generate_spec "." "notifications" ) +for spec in packages/nextcloud/lib/src/api/*.openapi.json; do + name="$(basename "$spec" | cut -d "." -f 1)" + if [ -f "tool/patches/$name.json" ]; then + cp "$spec" "/tmp/nextcloud-neon/$name.json" + jsonpatch --indent 4 "/tmp/nextcloud-neon/$name.json" "tool/patches/$name.json" > "$spec" + fi +done + ( cd external/nextcloud-server composer exec merge-specs -- --core ../../packages/nextcloud/lib/src/api/core.openapi.json --merged /tmp/nextcloud-neon/merged.json ../../packages/nextcloud/lib/src/api/*.openapi.json --openapi-version 3.1.0