Browse Source

Merge pull request #181 from provokateurin/feature/merge-specs-more-intelligently

tool,nextcloud: Merge specs more intelligently
pull/182/head
Kate 2 years ago committed by GitHub
parent
commit
dae85cef8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/nextcloud/lib/src/nextcloud.openapi.json
  2. 15
      tool/generate-nextcloud.sh

5
packages/nextcloud/lib/src/nextcloud.openapi.json

@ -2,10 +2,11 @@
"openapi": "3.1.0", "openapi": "3.1.0",
"info": { "info": {
"title": "Nextcloud", "title": "Nextcloud",
"version": "latest", "version": "25.0.2",
"description": "All supported Nextcloud APIs in one",
"license": { "license": {
"name": "agpl", "name": "agpl",
"identifier": "AGPL-3.0" "identifier": " AGPL-3.0"
} }
}, },
"servers": [ "servers": [

15
tool/generate-nextcloud.sh

@ -29,6 +29,8 @@ for i in $(seq 0 $((${#codenames[@]} - 1))); do
jq \ jq \
-s \ -s \
'{ '{
openapi: .[0].openapi,
info: .[0].info,
servers: .[0].servers, servers: .[0].servers,
security: .[0].security, security: .[0].security,
tags: (.[0].tags + .[1].tags), tags: (.[0].tags + .[1].tags),
@ -45,21 +47,16 @@ done
jq \ jq \
' '
{ {
openapi: "3.1.0", openapi: .openapi,
info: { info: .info,
title: "Nextcloud",
version: "latest",
license: {
name: "agpl",
identifier: "AGPL-3.0"
}
},
servers: .servers, servers: .servers,
security: .security, security: .security,
tags: .tags, tags: .tags,
components: .components, components: .components,
paths: .paths, paths: .paths,
} }
| .info.title = "Nextcloud"
| .info.description = "All supported Nextcloud APIs in one"
' $merged_spec > packages/nextcloud/lib/src/nextcloud.openapi.json ' $merged_spec > packages/nextcloud/lib/src/nextcloud.openapi.json
( (

Loading…
Cancel
Save