Skip to content

Commit

Permalink
feat(docs): mulitple schema generation
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Oct 19, 2022
1 parent 5b165e3 commit 958093b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ cosmwasm-check ./target/wasm32-unknown-unknown/release/*.wasm
dependencies = ["schema"]
script = '''
DOCS_FOLDER=docs
SCHEMA_FOLDER=schema
echo "🔎 Checking jsonschema2md installed..."
if ! command -v jsonschema2md &> /dev/null
then
Expand All @@ -107,9 +108,15 @@ then
exit
fi
mkdir -p $SCHEMA_FOLDER
find contracts -type f -name '*.json' \
-exec sh -c 'cp "$@" "$0"' $SCHEMA_FOLDER/ {} +
echo "📚 Generating documentation..."
jsonschema2md -d schema -o $DOCS_FOLDER --schema-extension json --schema-out $DOCS_FOLDER/schema
echo "📖 Documentation has been successfully generated and available at $(pwd)/$DOCS_FOLDER/README.md"
rm -rf $SCHEMA_FOLDER
'''

[config]
Expand Down

0 comments on commit 958093b

Please sign in to comment.