Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix conformance class publishing #370

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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