From 3e103a492521b6f03e4529a2d2e7a1fa75bc34f7 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Wed, 21 Dec 2022 14:51:47 +0100 Subject: [PATCH] tool: Don't add prefixes to references in other files --- tool/generate-nextcloud.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/generate-nextcloud.sh b/tool/generate-nextcloud.sh index 408f9bc3..8e67faf8 100755 --- a/tool/generate-nextcloud.sh +++ b/tool/generate-nextcloud.sh @@ -19,7 +19,7 @@ for i in $(seq 0 $((${#codenames[@]} - 1))); do -s \ '.[] | .components.schemas = (.components.schemas | with_entries(.key = if .key == "OCSMeta" or .key == "EmptyOCS" then .key else $prefix + .key end)) - | walk(if type == "object" and has("$ref") and ."$ref" != "#/components/schemas/OCSMeta" and ."$ref" != "#/components/schemas/EmptyOCS" then ."$ref" |= sub("#/components/schemas/";"#/components/schemas/" + $prefix) else . end)' \ + | walk(if type == "object" and has("$ref") and ."$ref" != "#/components/schemas/OCSMeta" and ."$ref" != "#/components/schemas/EmptyOCS" then ."$ref" |= sub("^#/components/schemas/";"#/components/schemas/" + $prefix) else . end)' \ /tmp/nextcloud-neon/"$codename".json \ > /tmp/nextcloud-neon/"$codename"-prefixed.json