diff --git a/contracts/cw2981-royalties/schema/contract_info_response.json b/contracts/cw2981-royalties/schema/contract_info_response.json deleted file mode 100644 index 4a805a825..000000000 --- a/contracts/cw2981-royalties/schema/contract_info_response.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ContractInfoResponse", - "type": "object", - "required": [ - "name", - "symbol" - ], - "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/cw2981-royalties/schema/contract_info_response_for__empty.json b/contracts/cw2981-royalties/schema/contract_info_response_for__empty.json index 3875a1d3c..c1a521d3e 100644 --- a/contracts/cw2981-royalties/schema/contract_info_response_for__empty.json +++ b/contracts/cw2981-royalties/schema/contract_info_response_for__empty.json @@ -32,6 +32,7 @@ "type": "string" } }, + "additionalProperties": false, "definitions": { "Empty": { "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", diff --git a/contracts/cw2981-royalties/schema/instantiate_msg.json b/contracts/cw2981-royalties/schema/instantiate_msg.json deleted file mode 100644 index de32ec658..000000000 --- a/contracts/cw2981-royalties/schema/instantiate_msg.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "minter", - "name", - "symbol" - ], - "properties": { - "minter": { - "description": "The minter is the only one who can create new NFTs. This is designed for a base NFT that is controlled by an external program or contract. You will likely replace this with custom logic in custom NFTs", - "type": "string" - }, - "name": { - "description": "Name of the NFT contract", - "type": "string" - }, - "symbol": { - "description": "Symbol of the NFT contract", - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/cw2981-royalties/schema/instantiate_msg_for__empty.json b/contracts/cw2981-royalties/schema/instantiate_msg_for__empty.json index 0cac52f30..6e4c60f7b 100644 --- a/contracts/cw2981-royalties/schema/instantiate_msg_for__empty.json +++ b/contracts/cw2981-royalties/schema/instantiate_msg_for__empty.json @@ -37,6 +37,7 @@ "type": "string" } }, + "additionalProperties": false, "definitions": { "Empty": { "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", diff --git a/contracts/cw721-base/schema/contract_info_response.json b/contracts/cw721-base/schema/contract_info_response.json deleted file mode 100644 index 4a805a825..000000000 --- a/contracts/cw721-base/schema/contract_info_response.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ContractInfoResponse", - "type": "object", - "required": [ - "name", - "symbol" - ], - "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/cw721-base/schema/contract_info_response_for__empty.json b/contracts/cw721-base/schema/contract_info_response_for__empty.json index 3875a1d3c..c1a521d3e 100644 --- a/contracts/cw721-base/schema/contract_info_response_for__empty.json +++ b/contracts/cw721-base/schema/contract_info_response_for__empty.json @@ -32,6 +32,7 @@ "type": "string" } }, + "additionalProperties": false, "definitions": { "Empty": { "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", diff --git a/contracts/cw721-base/schema/instantiate_msg.json b/contracts/cw721-base/schema/instantiate_msg.json deleted file mode 100644 index de32ec658..000000000 --- a/contracts/cw721-base/schema/instantiate_msg.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "minter", - "name", - "symbol" - ], - "properties": { - "minter": { - "description": "The minter is the only one who can create new NFTs. This is designed for a base NFT that is controlled by an external program or contract. You will likely replace this with custom logic in custom NFTs", - "type": "string" - }, - "name": { - "description": "Name of the NFT contract", - "type": "string" - }, - "symbol": { - "description": "Symbol of the NFT contract", - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/cw721-base/schema/instantiate_msg_for__empty.json b/contracts/cw721-base/schema/instantiate_msg_for__empty.json index 0cac52f30..6e4c60f7b 100644 --- a/contracts/cw721-base/schema/instantiate_msg_for__empty.json +++ b/contracts/cw721-base/schema/instantiate_msg_for__empty.json @@ -37,6 +37,7 @@ "type": "string" } }, + "additionalProperties": false, "definitions": { "Empty": { "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", diff --git a/contracts/cw721-metadata-onchain/schema/contract_info_response.json b/contracts/cw721-metadata-onchain/schema/contract_info_response.json deleted file mode 100644 index 4a805a825..000000000 --- a/contracts/cw721-metadata-onchain/schema/contract_info_response.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "ContractInfoResponse", - "type": "object", - "required": [ - "name", - "symbol" - ], - "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/cw721-metadata-onchain/schema/contract_info_response_for__empty.json b/contracts/cw721-metadata-onchain/schema/contract_info_response_for__empty.json index 3875a1d3c..c1a521d3e 100644 --- a/contracts/cw721-metadata-onchain/schema/contract_info_response_for__empty.json +++ b/contracts/cw721-metadata-onchain/schema/contract_info_response_for__empty.json @@ -32,6 +32,7 @@ "type": "string" } }, + "additionalProperties": false, "definitions": { "Empty": { "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", diff --git a/contracts/cw721-metadata-onchain/schema/instantiate_msg.json b/contracts/cw721-metadata-onchain/schema/instantiate_msg.json deleted file mode 100644 index de32ec658..000000000 --- a/contracts/cw721-metadata-onchain/schema/instantiate_msg.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "InstantiateMsg", - "type": "object", - "required": [ - "minter", - "name", - "symbol" - ], - "properties": { - "minter": { - "description": "The minter is the only one who can create new NFTs. This is designed for a base NFT that is controlled by an external program or contract. You will likely replace this with custom logic in custom NFTs", - "type": "string" - }, - "name": { - "description": "Name of the NFT contract", - "type": "string" - }, - "symbol": { - "description": "Symbol of the NFT contract", - "type": "string" - } - }, - "additionalProperties": false -} diff --git a/contracts/cw721-metadata-onchain/schema/instantiate_msg_for__empty.json b/contracts/cw721-metadata-onchain/schema/instantiate_msg_for__empty.json index 0cac52f30..6e4c60f7b 100644 --- a/contracts/cw721-metadata-onchain/schema/instantiate_msg_for__empty.json +++ b/contracts/cw721-metadata-onchain/schema/instantiate_msg_for__empty.json @@ -37,6 +37,7 @@ "type": "string" } }, + "additionalProperties": false, "definitions": { "Empty": { "description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressable in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)", diff --git a/scripts/schema.sh b/scripts/schema.sh new file mode 100644 index 000000000..6e294ff48 --- /dev/null +++ b/scripts/schema.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +START_DIR=$(pwd) +for f in ./contracts/* +do + echo "generating schema for $f" + cd "$f" + CMD="cargo run --example schema" + eval $CMD > /dev/null + cd "$START_DIR" +done