Skip to content

Commit

Permalink
Merge pull request #370 from philvarner/pv/fix-conformance-class-publish
Browse files Browse the repository at this point in the history
fix conformance class publishing
  • Loading branch information
philvarner authored Jan 16, 2023
2 parents 311dc78 + 66a96f2 commit 2d3c0cf
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions .circleci/build-openapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,12 @@
PATH=./node_modules/.bin:$PATH

# find all OpenAPI docs that are not fragments
FNAMES=`find . -name "openapi.yaml" -not -path "./fragments/*" -not -path "./node_modules/*"`

# use speccy to resolve
for fin in $FNAMES; do
fout=./build/$fin
mkdir -p ${fout%/*}
openapi bundle --ext yaml --output $fout $fin
cp build/redoc_index.html ${fout%/*}/index.html
FINS=(core/openapi.yaml item-search/openapi.yaml ogcapi-features/openapi-collections.yaml ogcapi-features/openapi-features.yaml)
FOUTS=(core item-search collections ogcapi-features)

for i in "${!FINS[@]}"; do
fout=./build/${FOUTS[$i]}/openapi.yaml
mkdir -p "${fout%/*}"
openapi bundle --ext yaml --output "${fout}" "${FINS[$i]}"
cp build/redoc_index.html "${fout%/*}"/index.html
done

# use swagger-combine
#swagger-combine build/swagger-config.yaml --continueOnConflictingPaths -o build/openapi.yaml

# use openapi-merge-cli
#openapi-merge-cli -c build/openapi-merge-config.json
#json2yaml build/openapi-merge.json > build/openapi-merge.yaml

# use yq
#yq merge -a \
# build/core/openapi.yaml \
# build/item-search/openapi.yaml \
# build/ogcapi-features/openapi.yaml \
# build/ogcapi-features/extensions/transaction/openapi.yaml \
# build/ogcapi-features/extensions/version/openapi.yaml \
# | tee build/openapi-yq.yaml

0 comments on commit 2d3c0cf

Please sign in to comment.