From 382e49c346012712e2115566889093bd046fe52f Mon Sep 17 00:00:00 2001 From: Adwait Date: Tue, 6 Aug 2024 19:26:00 +0530 Subject: [PATCH 1/4] Public Implementations API for JSON Schema Org --- .github/workflows/report.yml | 49 +++++++++++- bowtie/schemas/public-implementations.json | 77 +++++++++++++++++++ .../schemas/public-implementations.json | 77 +++++++++++++++++++ 3 files changed, 201 insertions(+), 2 deletions(-) create mode 100644 bowtie/schemas/public-implementations.json create mode 100644 bowtie/tests/fauxmplementations/lintsonschema/schemas/public-implementations.json diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index 0b0f82aab..a2a8f251c 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -82,15 +82,48 @@ jobs: with: version: ${{ inputs.bowtie-version }} - - name: Generate implementations.json file + - name: Generate implementations.json (Private API) file run: | bowtie info $(bowtie filter-implementations | sed 's/^/-i /') --format json > implementations.json + - name: Generate public-implementations (Public API) file + run: | + bowtie filter-implementations | \ + while read -r impl; do + bowtie info -i $impl --format json | \ + jq --arg impl "$impl" ' + {(.source): ( + . + {name: $impl} + | del( + .os, + .os_version, + .source + ) + )} + ' + done | \ + jq -s 'add' > public-implementations + + - name: Validate public-implementations against its corresponding JSON Schema + run: | + VALIDATION=$(bowtie validate --expect valid -i python-jsonschema bowtie/schemas/public-implementations.json public-implementations) + SUMMARY=$(echo "$VALIDATION" | bowtie summary --show failures --format json) + if [ $(echo "$SUMMARY" | \ + jq 'all(.[]; .[1].failed == 0 and .[1].errored == 0 and .[1].skipped == 0)') == false ]; then + echo "public-implementations file is invalid under its JSON Schema" + exit 1 + fi + - uses: actions/upload-artifact@v4 with: name: implementations path: implementations.json + - uses: actions/upload-artifact@v4 + with: + name: public-implementations + path: public-implementations + site: needs: - regenerate-reports @@ -114,12 +147,24 @@ jobs: path: site/ merge-multiple: true - - name: Include Implementation Metadata + - name: Include Implementations Metadata (Private API) uses: actions/download-artifact@v4 with: name: implementations path: site/ + - name: Create a Public Directory Structure for JSON Schema Org + run: mkdir -p site/v1/json-schema-org + + - name: Include Public Implementations Metadata (Public API) + uses: actions/download-artifact@v4 + with: + name: public-implementations + path: site/v1/json-schema-org/ + + - name: Rename "public-implementations" file to just "implementations" + run: mv site/v1/json-schema-org/public-implementations site/v1/json-schema-org/implementations + - name: Generate Badges run: bowtie badges diff --git a/bowtie/schemas/public-implementations.json b/bowtie/schemas/public-implementations.json new file mode 100644 index 000000000..6a807adf4 --- /dev/null +++ b/bowtie/schemas/public-implementations.json @@ -0,0 +1,77 @@ +{ + "title": "Public Implementations", + "description": "A Public API providing metadata about implementations of JSON Schema supported by Bowtie", + + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$id": "tag:bowtie.report,2024:models:public-implementations", + + "type": "object", + "propertyNames": { + "description": "A URL where the implementation's source code is hosted", + + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "object", + "required": ["name", "language", "dialects", "homepage", "issues"], + "properties": { + "name": { "type": "string" }, + "language": { + "description": "The implementation language (e.g. C++, Python, etc.)", + + "type": "string", + "pattern": "^[a-z][a-z0-9-+_]*$" + }, + "dialects": { + "description": "A list of JSON Schema dialects (URIs) which the implementation understands. When running test cases, this list will be consulted before sending them to the implementation (and any unsupported dialects will be skipped).", + + "type": "array", + "items": { "type": "string", "format": "uri" } + }, + "homepage": { + "description": "A URL for the implementation's homepage", + + "type": "string", + "format": "uri" + }, + "issues": { + "description": "A URL for the implementation's bug tracker", + + "type": "string", + "format": "uri" + }, + "version": { + "description": "The implementation version", + + "type": "string" + }, + "language_version": { + "description": "Version of language used to run the implementation", + "type": "string" + }, + "documentation": { + "description": "A URL for the implementation's documentation", + + "type": "string", + "format": "uri" + }, + "links": { + "description": "Additional web page links relevant to the implementation", + + "type": "array", + "items": { + "type": "object", + "required": ["description", "url"], + "properties": { + "description": { "type": "string" }, + "url": { "type": "string", "format": "uri" } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } +} diff --git a/bowtie/tests/fauxmplementations/lintsonschema/schemas/public-implementations.json b/bowtie/tests/fauxmplementations/lintsonschema/schemas/public-implementations.json new file mode 100644 index 000000000..6a807adf4 --- /dev/null +++ b/bowtie/tests/fauxmplementations/lintsonschema/schemas/public-implementations.json @@ -0,0 +1,77 @@ +{ + "title": "Public Implementations", + "description": "A Public API providing metadata about implementations of JSON Schema supported by Bowtie", + + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$id": "tag:bowtie.report,2024:models:public-implementations", + + "type": "object", + "propertyNames": { + "description": "A URL where the implementation's source code is hosted", + + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "object", + "required": ["name", "language", "dialects", "homepage", "issues"], + "properties": { + "name": { "type": "string" }, + "language": { + "description": "The implementation language (e.g. C++, Python, etc.)", + + "type": "string", + "pattern": "^[a-z][a-z0-9-+_]*$" + }, + "dialects": { + "description": "A list of JSON Schema dialects (URIs) which the implementation understands. When running test cases, this list will be consulted before sending them to the implementation (and any unsupported dialects will be skipped).", + + "type": "array", + "items": { "type": "string", "format": "uri" } + }, + "homepage": { + "description": "A URL for the implementation's homepage", + + "type": "string", + "format": "uri" + }, + "issues": { + "description": "A URL for the implementation's bug tracker", + + "type": "string", + "format": "uri" + }, + "version": { + "description": "The implementation version", + + "type": "string" + }, + "language_version": { + "description": "Version of language used to run the implementation", + "type": "string" + }, + "documentation": { + "description": "A URL for the implementation's documentation", + + "type": "string", + "format": "uri" + }, + "links": { + "description": "Additional web page links relevant to the implementation", + + "type": "array", + "items": { + "type": "object", + "required": ["description", "url"], + "properties": { + "description": { "type": "string" }, + "url": { "type": "string", "format": "uri" } + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false + } +} From 7e87483224388a6db3ca18b050a9cdab9f07690c Mon Sep 17 00:00:00 2001 From: Adwait Date: Tue, 6 Aug 2024 23:25:49 +0530 Subject: [PATCH 2/4] fix suggested changes --- .github/workflows/report.yml | 26 +- .../v1/json-schema-org/implementations.json | 29 ++ bowtie/schemas/public-implementations.json | 77 ---- .../v1/json-schema-org/implementations.json | 29 ++ .../schemas/public-implementations.json | 77 ---- test.json | 431 ++++++++++++++++++ 6 files changed, 507 insertions(+), 162 deletions(-) create mode 100644 bowtie/schemas/api/v1/json-schema-org/implementations.json delete mode 100644 bowtie/schemas/public-implementations.json create mode 100644 bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json delete mode 100644 bowtie/tests/fauxmplementations/lintsonschema/schemas/public-implementations.json create mode 100644 test.json diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index a2a8f251c..c774c3865 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -86,19 +86,29 @@ jobs: run: | bowtie info $(bowtie filter-implementations | sed 's/^/-i /') --format json > implementations.json - - name: Generate public-implementations (Public API) file + - name: Generate implementations API file for JSON Schema Org run: | bowtie filter-implementations | \ while read -r impl; do + COMPLIANCE_URLS=( \ + bowtie filter-dialects -i $impl | \ + jq -R -s 'split("\n")[:-1] | map(. as $uri | input | fromjson | .[] | select(.uri == $uri) | \ + "https://bowtie.report/badges/\($impl)/compliance/" + .shortName)' data/dialects.json + ) + bowtie info -i $impl --format json | \ - jq --arg impl "$impl" ' + jq --arg impl "$impl" --argjson compliance "$COMPLIANCE_URLS" ' {(.source): ( - . + {name: $impl} - | del( - .os, - .os_version, - .source + { + id: $impl, + dialects: .dialects, + badges_urls: ( + { + supported_versions: "https://bowtie.report/badges/\($impl)/supported_versions.json", + compliance: $compliance + } ) + } )} ' done | \ @@ -106,7 +116,7 @@ jobs: - name: Validate public-implementations against its corresponding JSON Schema run: | - VALIDATION=$(bowtie validate --expect valid -i python-jsonschema bowtie/schemas/public-implementations.json public-implementations) + VALIDATION=$(bowtie validate --expect valid -i python-jsonschema bowtie/schemas/api/v1/json-schema-org/implementations.json public-implementations) SUMMARY=$(echo "$VALIDATION" | bowtie summary --show failures --format json) if [ $(echo "$SUMMARY" | \ jq 'all(.[]; .[1].failed == 0 and .[1].errored == 0 and .[1].skipped == 0)') == false ]; then diff --git a/bowtie/schemas/api/v1/json-schema-org/implementations.json b/bowtie/schemas/api/v1/json-schema-org/implementations.json new file mode 100644 index 000000000..a2dcfe77d --- /dev/null +++ b/bowtie/schemas/api/v1/json-schema-org/implementations.json @@ -0,0 +1,29 @@ +{ + "title": "Implementations API for JSON Schema Org", + "description": "API providing metadata about implementations of JSON Schema supported by Bowtie", + + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$id": "tag:bowtie.report,2024:api:v1:json-schema-org:implementations", + + "type": "object", + "propertyNames": { + "description": "A URL where the implementation's source code is hosted", + + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "object", + "required": ["dialects"], + "properties": { + "dialects": { + "description": "A list of JSON Schema dialects (URIs) which the implementation understands.", + + "type": "array", + "items": { "type": "string", "format": "uri" } + } + }, + "additionalProperties": false + } +} diff --git a/bowtie/schemas/public-implementations.json b/bowtie/schemas/public-implementations.json deleted file mode 100644 index 6a807adf4..000000000 --- a/bowtie/schemas/public-implementations.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "title": "Public Implementations", - "description": "A Public API providing metadata about implementations of JSON Schema supported by Bowtie", - - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$id": "tag:bowtie.report,2024:models:public-implementations", - - "type": "object", - "propertyNames": { - "description": "A URL where the implementation's source code is hosted", - - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "object", - "required": ["name", "language", "dialects", "homepage", "issues"], - "properties": { - "name": { "type": "string" }, - "language": { - "description": "The implementation language (e.g. C++, Python, etc.)", - - "type": "string", - "pattern": "^[a-z][a-z0-9-+_]*$" - }, - "dialects": { - "description": "A list of JSON Schema dialects (URIs) which the implementation understands. When running test cases, this list will be consulted before sending them to the implementation (and any unsupported dialects will be skipped).", - - "type": "array", - "items": { "type": "string", "format": "uri" } - }, - "homepage": { - "description": "A URL for the implementation's homepage", - - "type": "string", - "format": "uri" - }, - "issues": { - "description": "A URL for the implementation's bug tracker", - - "type": "string", - "format": "uri" - }, - "version": { - "description": "The implementation version", - - "type": "string" - }, - "language_version": { - "description": "Version of language used to run the implementation", - "type": "string" - }, - "documentation": { - "description": "A URL for the implementation's documentation", - - "type": "string", - "format": "uri" - }, - "links": { - "description": "Additional web page links relevant to the implementation", - - "type": "array", - "items": { - "type": "object", - "required": ["description", "url"], - "properties": { - "description": { "type": "string" }, - "url": { "type": "string", "format": "uri" } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } -} diff --git a/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json b/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json new file mode 100644 index 000000000..a2dcfe77d --- /dev/null +++ b/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json @@ -0,0 +1,29 @@ +{ + "title": "Implementations API for JSON Schema Org", + "description": "API providing metadata about implementations of JSON Schema supported by Bowtie", + + "$schema": "https://json-schema.org/draft/2020-12/schema", + + "$id": "tag:bowtie.report,2024:api:v1:json-schema-org:implementations", + + "type": "object", + "propertyNames": { + "description": "A URL where the implementation's source code is hosted", + + "type": "string", + "format": "uri" + }, + "additionalProperties": { + "type": "object", + "required": ["dialects"], + "properties": { + "dialects": { + "description": "A list of JSON Schema dialects (URIs) which the implementation understands.", + + "type": "array", + "items": { "type": "string", "format": "uri" } + } + }, + "additionalProperties": false + } +} diff --git a/bowtie/tests/fauxmplementations/lintsonschema/schemas/public-implementations.json b/bowtie/tests/fauxmplementations/lintsonschema/schemas/public-implementations.json deleted file mode 100644 index 6a807adf4..000000000 --- a/bowtie/tests/fauxmplementations/lintsonschema/schemas/public-implementations.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "title": "Public Implementations", - "description": "A Public API providing metadata about implementations of JSON Schema supported by Bowtie", - - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "$id": "tag:bowtie.report,2024:models:public-implementations", - - "type": "object", - "propertyNames": { - "description": "A URL where the implementation's source code is hosted", - - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "object", - "required": ["name", "language", "dialects", "homepage", "issues"], - "properties": { - "name": { "type": "string" }, - "language": { - "description": "The implementation language (e.g. C++, Python, etc.)", - - "type": "string", - "pattern": "^[a-z][a-z0-9-+_]*$" - }, - "dialects": { - "description": "A list of JSON Schema dialects (URIs) which the implementation understands. When running test cases, this list will be consulted before sending them to the implementation (and any unsupported dialects will be skipped).", - - "type": "array", - "items": { "type": "string", "format": "uri" } - }, - "homepage": { - "description": "A URL for the implementation's homepage", - - "type": "string", - "format": "uri" - }, - "issues": { - "description": "A URL for the implementation's bug tracker", - - "type": "string", - "format": "uri" - }, - "version": { - "description": "The implementation version", - - "type": "string" - }, - "language_version": { - "description": "Version of language used to run the implementation", - "type": "string" - }, - "documentation": { - "description": "A URL for the implementation's documentation", - - "type": "string", - "format": "uri" - }, - "links": { - "description": "Additional web page links relevant to the implementation", - - "type": "array", - "items": { - "type": "object", - "required": ["description", "url"], - "properties": { - "description": { "type": "string" }, - "url": { "type": "string", "format": "uri" } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - } -} diff --git a/test.json b/test.json new file mode 100644 index 000000000..c6fc76738 --- /dev/null +++ b/test.json @@ -0,0 +1,431 @@ +{ + "https://github.com/tristanpenman/valijson": { + "name": "cpp-valijson", + "language": "c++", + "homepage": "https://github.com/tristanpenman/valijson", + "issues": "https://github.com/tristanpenman/valijson/issues", + "language_version": "C++17", + "dialects": [ + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/ajv-validator/ajv": { + "name": "js-ajv", + "language": "javascript", + "version": "8.17.1", + "documentation": "https://ajv.js.org/json-schema.html", + "homepage": "https://ajv.js.org/", + "issues": "https://github.com/ajv-validator/ajv/issues", + "language_version": "v22.5.1", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/openapi-processor/openapi-parser": { + "name": "java-openapiprocessor", + "language": "java", + "version": "2024.3", + "homepage": "https://github.com/openapi-processor/openapi-parser", + "issues": "https://github.com/openapi-processor/openapi-parser/issues", + "language_version": "22.0.2+11", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/OptimumCode/json-schema-validator": { + "name": "kotlin-kmp-json-schema-validator", + "language": "kotlin", + "version": "0.2.2", + "homepage": "https://github.com/OptimumCode/json-schema-validator", + "issues": "https://github.com/OptimumCode/json-schema-validator/issues", + "language_version": "2.0.0", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/marksparkza/jschon": { + "name": "python-jschon", + "language": "python", + "version": "0.11.1", + "documentation": "https://jschon.readthedocs.io/", + "homepage": "https://jschon.readthedocs.io/", + "issues": "https://github.com/marksparkza/jschon/issues", + "language_version": "3.12.4", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema" + ] + }, + "https://github.com/corvus-dotnet/corvus.jsonschema": { + "name": "dotnet-corvus-jsonschema", + "language": "dotnet", + "version": "3.0.27", + "documentation": "https://github.com/corvus-dotnet/Corvus.JsonSchema/blob/main/README.md", + "homepage": "https://github.com/corvus-dotnet/corvus.jsonschema", + "issues": "https://github.com/corvus-dotnet/corvus.jsonschema/issues", + "language_version": "8.0.7", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/harrel56/json-schema": { + "name": "java-json-schema", + "language": "java", + "version": "1.7.0", + "documentation": "https://javadoc.io/doc/dev.harrel/json-schema/latest/dev/harrel/jsonschema/package-summary.html", + "homepage": "https://github.com/harrel56/json-schema", + "issues": "https://github.com/harrel56/json-schema/issues", + "language_version": "22.0.2+11", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#" + ], + "links": [ + { + "description": "Group homepage", + "url": "https://harrel.dev/" + }, + { + "description": "Maven Central - implementation", + "url": "https://mvnrepository.com/artifact/dev.harrel/json-schema/1.7.0" + }, + { + "description": "Maven Central - used JSON provider", + "url": "https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.17.2" + } + ] + }, + "https://github.com/java-json-tools/json-schema-validator": { + "name": "java-json-tools-json-schema-validator", + "language": "java", + "version": "2.2.14", + "documentation": "https://github.com/java-json-tools/json-schema-validator", + "homepage": "https://github.com/java-json-tools/json-schema-validator", + "issues": "https://github.com/java-json-tools/json-schema-validator/issues", + "language_version": "22.0.2+11", + "dialects": [ + "http://json-schema.org/draft-04/schema#", + "http://json-schema.org/draft-03/schema#" + ] + }, + "https://github.com/microsoft/vscode-json-languageservice": { + "name": "ts-vscode-json-languageservice", + "language": "typescript", + "version": "5.4.0", + "homepage": "https://github.com/microsoft/vscode-json-languageservice", + "issues": "https://github.com/microsoft/vscode-json-languageservice/issues", + "language_version": "v22.5.1", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/santhosh-tekuri/jsonschema": { + "name": "go-jsonschema", + "language": "go", + "version": "v6.0.1", + "homepage": "https://github.com/santhosh-tekuri/jsonschema", + "issues": "https://github.com/santhosh-tekuri/jsonschema/issues", + "language_version": "go1.22.5", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/davishmcclurg/json_schemer": { + "name": "ruby-json_schemer", + "language": "ruby", + "version": "2.3.0", + "homepage": "https://github.com/davishmcclurg/json_schemer", + "issues": "https://github.com/davishmcclurg/json_schemer/issues", + "language_version": "3.3.4", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://gitlab.lip6.fr/jsonschema/modernjsonschemavalidator": { + "name": "scala-mjs-validator", + "language": "scala", + "version": "v0.1.0", + "homepage": "https://gitlab.lip6.fr/jsonschema/modernjsonschemavalidator", + "issues": "https://gitlab.lip6.fr/jsonschema/modernjsonschemavalidator/issues", + "language_version": "22.0.2+11", + "dialects": ["https://json-schema.org/draft/2020-12/schema"] + }, + "https://github.com/cfworker/cfworker": { + "name": "js-json-schema", + "language": "javascript", + "version": "1.12.8", + "homepage": "https://github.com/cfworker/cfworker/blob/main/packages/json-schema/README.md", + "issues": "https://github.com/cfworker/cfworker/issues", + "language_version": "v22.5.1", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/jimblackler/jsonschemafriend": { + "name": "java-jsonschemafriend", + "language": "java", + "version": "0.12.4", + "homepage": "https://github.com/jimblackler/jsonschemafriend", + "issues": "https://github.com/jimblackler/jsonschemafriend/issues", + "language_version": "22.0.2+11", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#", + "http://json-schema.org/draft-03/schema#" + ], + "links": [ + { + "description": "Maven Central - used JSON provider", + "url": "https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.17.2" + } + ] + }, + "https://github.com/xeipuuv/gojsonschema": { + "name": "go-gojsonschema", + "language": "go", + "version": "v1.2.0", + "homepage": "https://github.com/xeipuuv/gojsonschema", + "issues": "https://github.com/xeipuuv/gojsonschema/issues", + "language_version": "go1.20.5", + "dialects": [ + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/networknt/json-schema-validator/": { + "name": "java-networknt-json-schema-validator", + "language": "java", + "version": "1.5.1", + "documentation": "https://doc.networknt.com/library/json-schema-validator/", + "homepage": "https://github.com/networknt/json-schema-validator/", + "issues": "https://github.com/networknt/json-schema-validator/issues", + "language_version": "22.0.2+11", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/opis/json-schema": { + "name": "php-opis-json-schema", + "language": "php", + "version": "2.3.0", + "documentation": "https://opis.io/json-schema/2.x/", + "homepage": "https://opis.io/json-schema", + "issues": "https://github.com/opis/json-schema/issues", + "language_version": "8.4.0alpha2", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#" + ] + }, + "https://github.com/api7/jsonschema": { + "name": "lua-jsonschema", + "language": "lua", + "version": "0.9.9-0\n", + "homepage": "https://github.com/api7/jsonschema", + "issues": "https://github.com/api7/jsonschema/issues", + "language_version": "5.1", + "dialects": [ + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/horejsek/python-fastjsonschema": { + "name": "python-fastjsonschema", + "language": "python", + "version": "2.20.0", + "documentation": "https://horejsek.github.io/python-fastjsonschema/", + "homepage": "https://horejsek.github.io/python-fastjsonschema/", + "issues": "https://github.com/horejsek/python-fastjsonschema/issues", + "language_version": "3.12.4", + "dialects": [ + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/Stranger6667/jsonschema-rs": { + "name": "rust-jsonschema", + "language": "rust", + "version": "0.18.0", + "documentation": "https://docs.rs/jsonschema", + "homepage": "https://docs.rs/jsonschema", + "issues": "https://github.com/Stranger6667/jsonschema-rs/issues", + "language_version": "1.80.0", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/hyperjump-io/json-schema": { + "name": "js-hyperjump", + "language": "javascript", + "version": "1.9.6", + "homepage": "https://json-schema.hyperjump.io/", + "issues": "https://github.com/hyperjump-io/json-schema/issues", + "language_version": "v22.5.1", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/ExodusMovement/schemasafe": { + "name": "js-schemasafe", + "language": "javascript", + "version": "1.3.0", + "homepage": "https://github.com/ExodusMovement/schemasafe", + "issues": "https://github.com/ExodusMovement/schemasafe/issues", + "language_version": "v22.5.1", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/tdegrunt/jsonschema": { + "name": "js-jsonschema", + "language": "javascript", + "version": "1.4.1", + "homepage": "https://github.com/tdegrunt/jsonschema", + "issues": "https://github.com/tdegrunt/jsonschema/issues", + "language_version": "v22.5.1", + "dialects": [ + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#", + "http://json-schema.org/draft-03/schema#" + ] + }, + "https://github.com/sourcemeta/jsontoolkit": { + "name": "cpp-jsontoolkit", + "language": "c++", + "version": "631ce15e", + "homepage": "https://github.com/sourcemeta/jsontoolkit", + "issues": "https://github.com/sourcemeta/jsontoolkit/issues", + "dialects": [ + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/python-jsonschema/jsonschema": { + "name": "python-jsonschema", + "language": "python", + "version": "4.23.0", + "documentation": "https://python-jsonschema.readthedocs.io/", + "homepage": "https://python-jsonschema.readthedocs.io/", + "issues": "https://github.com/python-jsonschema/jsonschema/issues", + "language_version": "3.12.4", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#", + "http://json-schema.org/draft-03/schema#" + ] + }, + "https://github.com/luposlip/json-schema": { + "name": "clojure-json-schema", + "language": "clojure", + "homepage": "https://github.com/luposlip/json-schema", + "issues": "https://github.com/luposlip/json-schema/issues", + "language_version": "1.11.0", + "dialects": [ + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + }, + "https://github.com/gregsdennis/json-everything": { + "name": "dotnet-jsonschema-net", + "language": "dotnet", + "version": "7.1.2", + "documentation": "https://docs.json-everything.net/schema/basics/", + "homepage": "https://json-everything.net/json-schema/", + "issues": "https://github.com/gregsdennis/json-everything/issues", + "language_version": "8.0.7", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#" + ] + }, + "https://github.com/reactivecore/rc-circe-json-schema": { + "name": "scala-rc-circe-json-validator", + "language": "scala", + "version": "0.4.1", + "homepage": "https://github.com/reactivecore/rc-circe-json-schema", + "issues": "https://github.com/reactivecore/rc-circe-json-schema/issues", + "language_version": "22.0.2+11", + "dialects": ["https://json-schema.org/draft/2020-12/schema"] + }, + "https://github.com/santhosh-tekuri/boon": { + "name": "rust-boon", + "language": "rust", + "version": "0.6.0", + "documentation": "https://docs.rs/boon", + "homepage": "https://github.com/santhosh-tekuri/boon", + "issues": "htps://github.com/santhosh-tekuri/boon/issues", + "language_version": "1.80.0", + "dialects": [ + "https://json-schema.org/draft/2020-12/schema", + "https://json-schema.org/draft/2019-09/schema", + "http://json-schema.org/draft-07/schema#", + "http://json-schema.org/draft-06/schema#", + "http://json-schema.org/draft-04/schema#" + ] + } +} From 857662f5acd489e4e64c8a8288357a2bcb79e24c Mon Sep 17 00:00:00 2001 From: Adwait Date: Wed, 7 Aug 2024 20:25:24 +0530 Subject: [PATCH 3/4] final fixes at generating implementations metadata file for json-schema.org --- .github/workflows/report.yml | 58 +-- .../v1/json-schema-org/implementations.json | 32 +- .../v1/json-schema-org/implementations.json | 32 +- test.json | 431 ------------------ 4 files changed, 87 insertions(+), 466 deletions(-) delete mode 100644 test.json diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index c774c3865..a390ee21e 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -82,45 +82,51 @@ jobs: with: version: ${{ inputs.bowtie-version }} - - name: Generate implementations.json (Private API) file + - name: Generate implementations.json file for private API run: | bowtie info $(bowtie filter-implementations | sed 's/^/-i /') --format json > implementations.json - - name: Generate implementations API file for JSON Schema Org + - name: Create a directory structure for json-schema.org to access Implementations metadata file + run: mkdir -p api/v1/json-schema-org + + - name: Generate implementations metadata file suitable for use by json-schema.org run: | bowtie filter-implementations | \ while read -r impl; do - COMPLIANCE_URLS=( \ - bowtie filter-dialects -i $impl | \ - jq -R -s 'split("\n")[:-1] | map(. as $uri | input | fromjson | .[] | select(.uri == $uri) | \ - "https://bowtie.report/badges/\($impl)/compliance/" + .shortName)' data/dialects.json - ) - bowtie info -i $impl --format json | \ - jq --arg impl "$impl" --argjson compliance "$COMPLIANCE_URLS" ' - {(.source): ( + jq --arg impl "$impl" --slurpfile dialects data/dialects.json ' + . as $info | + {($info.source): ( { id: $impl, - dialects: .dialects, + dialects: $info.dialects, badges_urls: ( { - supported_versions: "https://bowtie.report/badges/\($impl)/supported_versions.json", - compliance: $compliance + supported_versions: "https://bowtie.report/badges/\($info.language)-\($info.name)/supported_versions.json", + dialects_compliance: ( + $info.dialects | map( + . as $uri | + $dialects[0] | map(select(.uri == $uri)) | .[0] | + { + (.shortName): "https://bowtie.report/badges/\($info.language)-\($info.name)/compliance/\(.shortName).json" + } + ) | add + ) } ) } )} ' done | \ - jq -s 'add' > public-implementations + jq -s 'add' > api/v1/json-schema-org/implementations - - name: Validate public-implementations against its corresponding JSON Schema + - name: Validate implementations metadata file generated for json-schema.org against its corresponding JSON Schema run: | - VALIDATION=$(bowtie validate --expect valid -i python-jsonschema bowtie/schemas/api/v1/json-schema-org/implementations.json public-implementations) + VALIDATION=$(bowtie validate --expect valid -i python-jsonschema bowtie/schemas/api/v1/json-schema-org/implementations.json api/v1/json-schema-org/implementations) SUMMARY=$(echo "$VALIDATION" | bowtie summary --show failures --format json) if [ $(echo "$SUMMARY" | \ jq 'all(.[]; .[1].failed == 0 and .[1].errored == 0 and .[1].skipped == 0)') == false ]; then - echo "public-implementations file is invalid under its JSON Schema" + echo "Implementations metadata file generated for json-schema.org is invalid under its JSON Schema" exit 1 fi @@ -131,8 +137,8 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: public-implementations - path: public-implementations + name: api + path: api site: needs: @@ -157,23 +163,17 @@ jobs: path: site/ merge-multiple: true - - name: Include Implementations Metadata (Private API) + - name: Include Implementations metadata file for private API uses: actions/download-artifact@v4 with: name: implementations path: site/ - - name: Create a Public Directory Structure for JSON Schema Org - run: mkdir -p site/v1/json-schema-org - - - name: Include Public Implementations Metadata (Public API) + - name: Include api directory uses: actions/download-artifact@v4 with: - name: public-implementations - path: site/v1/json-schema-org/ - - - name: Rename "public-implementations" file to just "implementations" - run: mv site/v1/json-schema-org/public-implementations site/v1/json-schema-org/implementations + name: api + path: site/api - name: Generate Badges run: bowtie badges diff --git a/bowtie/schemas/api/v1/json-schema-org/implementations.json b/bowtie/schemas/api/v1/json-schema-org/implementations.json index a2dcfe77d..9e62297ca 100644 --- a/bowtie/schemas/api/v1/json-schema-org/implementations.json +++ b/bowtie/schemas/api/v1/json-schema-org/implementations.json @@ -1,6 +1,6 @@ { - "title": "Implementations API for JSON Schema Org", - "description": "API providing metadata about implementations of JSON Schema supported by Bowtie", + "title": "Implementations metadata file suitable for use by json-schema.org", + "description": "JSON file providing metadata about implementations of JSON Schema supported by Bowtie", "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -15,15 +15,41 @@ }, "additionalProperties": { "type": "object", - "required": ["dialects"], "properties": { + "id": { + "type": "string" + }, "dialects": { "description": "A list of JSON Schema dialects (URIs) which the implementation understands.", "type": "array", "items": { "type": "string", "format": "uri" } + }, + "badges_urls": { + "type": "object", + "properties": { + "supported_versions": { + "type": "string", + "format": "uri" + }, + "dialects_compliance": { + "type": "object", + "propertyNames": { + "readOnly": true, + "type": "string", + "pattern": "[a-z]+[a-z0-9-]*" + }, + "additionalProperties": { + "type": "string", + "format": "uri" + } + }, + "required": ["supported_versions", "dialects_compliance"], + "additionalProperties": false + } } }, + "required": ["id", "dialects", "badges_urls"], "additionalProperties": false } } diff --git a/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json b/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json index a2dcfe77d..9e62297ca 100644 --- a/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json +++ b/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json @@ -1,6 +1,6 @@ { - "title": "Implementations API for JSON Schema Org", - "description": "API providing metadata about implementations of JSON Schema supported by Bowtie", + "title": "Implementations metadata file suitable for use by json-schema.org", + "description": "JSON file providing metadata about implementations of JSON Schema supported by Bowtie", "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -15,15 +15,41 @@ }, "additionalProperties": { "type": "object", - "required": ["dialects"], "properties": { + "id": { + "type": "string" + }, "dialects": { "description": "A list of JSON Schema dialects (URIs) which the implementation understands.", "type": "array", "items": { "type": "string", "format": "uri" } + }, + "badges_urls": { + "type": "object", + "properties": { + "supported_versions": { + "type": "string", + "format": "uri" + }, + "dialects_compliance": { + "type": "object", + "propertyNames": { + "readOnly": true, + "type": "string", + "pattern": "[a-z]+[a-z0-9-]*" + }, + "additionalProperties": { + "type": "string", + "format": "uri" + } + }, + "required": ["supported_versions", "dialects_compliance"], + "additionalProperties": false + } } }, + "required": ["id", "dialects", "badges_urls"], "additionalProperties": false } } diff --git a/test.json b/test.json deleted file mode 100644 index c6fc76738..000000000 --- a/test.json +++ /dev/null @@ -1,431 +0,0 @@ -{ - "https://github.com/tristanpenman/valijson": { - "name": "cpp-valijson", - "language": "c++", - "homepage": "https://github.com/tristanpenman/valijson", - "issues": "https://github.com/tristanpenman/valijson/issues", - "language_version": "C++17", - "dialects": [ - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/ajv-validator/ajv": { - "name": "js-ajv", - "language": "javascript", - "version": "8.17.1", - "documentation": "https://ajv.js.org/json-schema.html", - "homepage": "https://ajv.js.org/", - "issues": "https://github.com/ajv-validator/ajv/issues", - "language_version": "v22.5.1", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/openapi-processor/openapi-parser": { - "name": "java-openapiprocessor", - "language": "java", - "version": "2024.3", - "homepage": "https://github.com/openapi-processor/openapi-parser", - "issues": "https://github.com/openapi-processor/openapi-parser/issues", - "language_version": "22.0.2+11", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/OptimumCode/json-schema-validator": { - "name": "kotlin-kmp-json-schema-validator", - "language": "kotlin", - "version": "0.2.2", - "homepage": "https://github.com/OptimumCode/json-schema-validator", - "issues": "https://github.com/OptimumCode/json-schema-validator/issues", - "language_version": "2.0.0", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/marksparkza/jschon": { - "name": "python-jschon", - "language": "python", - "version": "0.11.1", - "documentation": "https://jschon.readthedocs.io/", - "homepage": "https://jschon.readthedocs.io/", - "issues": "https://github.com/marksparkza/jschon/issues", - "language_version": "3.12.4", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema" - ] - }, - "https://github.com/corvus-dotnet/corvus.jsonschema": { - "name": "dotnet-corvus-jsonschema", - "language": "dotnet", - "version": "3.0.27", - "documentation": "https://github.com/corvus-dotnet/Corvus.JsonSchema/blob/main/README.md", - "homepage": "https://github.com/corvus-dotnet/corvus.jsonschema", - "issues": "https://github.com/corvus-dotnet/corvus.jsonschema/issues", - "language_version": "8.0.7", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/harrel56/json-schema": { - "name": "java-json-schema", - "language": "java", - "version": "1.7.0", - "documentation": "https://javadoc.io/doc/dev.harrel/json-schema/latest/dev/harrel/jsonschema/package-summary.html", - "homepage": "https://github.com/harrel56/json-schema", - "issues": "https://github.com/harrel56/json-schema/issues", - "language_version": "22.0.2+11", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#" - ], - "links": [ - { - "description": "Group homepage", - "url": "https://harrel.dev/" - }, - { - "description": "Maven Central - implementation", - "url": "https://mvnrepository.com/artifact/dev.harrel/json-schema/1.7.0" - }, - { - "description": "Maven Central - used JSON provider", - "url": "https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.17.2" - } - ] - }, - "https://github.com/java-json-tools/json-schema-validator": { - "name": "java-json-tools-json-schema-validator", - "language": "java", - "version": "2.2.14", - "documentation": "https://github.com/java-json-tools/json-schema-validator", - "homepage": "https://github.com/java-json-tools/json-schema-validator", - "issues": "https://github.com/java-json-tools/json-schema-validator/issues", - "language_version": "22.0.2+11", - "dialects": [ - "http://json-schema.org/draft-04/schema#", - "http://json-schema.org/draft-03/schema#" - ] - }, - "https://github.com/microsoft/vscode-json-languageservice": { - "name": "ts-vscode-json-languageservice", - "language": "typescript", - "version": "5.4.0", - "homepage": "https://github.com/microsoft/vscode-json-languageservice", - "issues": "https://github.com/microsoft/vscode-json-languageservice/issues", - "language_version": "v22.5.1", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/santhosh-tekuri/jsonschema": { - "name": "go-jsonschema", - "language": "go", - "version": "v6.0.1", - "homepage": "https://github.com/santhosh-tekuri/jsonschema", - "issues": "https://github.com/santhosh-tekuri/jsonschema/issues", - "language_version": "go1.22.5", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/davishmcclurg/json_schemer": { - "name": "ruby-json_schemer", - "language": "ruby", - "version": "2.3.0", - "homepage": "https://github.com/davishmcclurg/json_schemer", - "issues": "https://github.com/davishmcclurg/json_schemer/issues", - "language_version": "3.3.4", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://gitlab.lip6.fr/jsonschema/modernjsonschemavalidator": { - "name": "scala-mjs-validator", - "language": "scala", - "version": "v0.1.0", - "homepage": "https://gitlab.lip6.fr/jsonschema/modernjsonschemavalidator", - "issues": "https://gitlab.lip6.fr/jsonschema/modernjsonschemavalidator/issues", - "language_version": "22.0.2+11", - "dialects": ["https://json-schema.org/draft/2020-12/schema"] - }, - "https://github.com/cfworker/cfworker": { - "name": "js-json-schema", - "language": "javascript", - "version": "1.12.8", - "homepage": "https://github.com/cfworker/cfworker/blob/main/packages/json-schema/README.md", - "issues": "https://github.com/cfworker/cfworker/issues", - "language_version": "v22.5.1", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/jimblackler/jsonschemafriend": { - "name": "java-jsonschemafriend", - "language": "java", - "version": "0.12.4", - "homepage": "https://github.com/jimblackler/jsonschemafriend", - "issues": "https://github.com/jimblackler/jsonschemafriend/issues", - "language_version": "22.0.2+11", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#", - "http://json-schema.org/draft-03/schema#" - ], - "links": [ - { - "description": "Maven Central - used JSON provider", - "url": "https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.17.2" - } - ] - }, - "https://github.com/xeipuuv/gojsonschema": { - "name": "go-gojsonschema", - "language": "go", - "version": "v1.2.0", - "homepage": "https://github.com/xeipuuv/gojsonschema", - "issues": "https://github.com/xeipuuv/gojsonschema/issues", - "language_version": "go1.20.5", - "dialects": [ - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/networknt/json-schema-validator/": { - "name": "java-networknt-json-schema-validator", - "language": "java", - "version": "1.5.1", - "documentation": "https://doc.networknt.com/library/json-schema-validator/", - "homepage": "https://github.com/networknt/json-schema-validator/", - "issues": "https://github.com/networknt/json-schema-validator/issues", - "language_version": "22.0.2+11", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/opis/json-schema": { - "name": "php-opis-json-schema", - "language": "php", - "version": "2.3.0", - "documentation": "https://opis.io/json-schema/2.x/", - "homepage": "https://opis.io/json-schema", - "issues": "https://github.com/opis/json-schema/issues", - "language_version": "8.4.0alpha2", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#" - ] - }, - "https://github.com/api7/jsonschema": { - "name": "lua-jsonschema", - "language": "lua", - "version": "0.9.9-0\n", - "homepage": "https://github.com/api7/jsonschema", - "issues": "https://github.com/api7/jsonschema/issues", - "language_version": "5.1", - "dialects": [ - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/horejsek/python-fastjsonschema": { - "name": "python-fastjsonschema", - "language": "python", - "version": "2.20.0", - "documentation": "https://horejsek.github.io/python-fastjsonschema/", - "homepage": "https://horejsek.github.io/python-fastjsonschema/", - "issues": "https://github.com/horejsek/python-fastjsonschema/issues", - "language_version": "3.12.4", - "dialects": [ - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/Stranger6667/jsonschema-rs": { - "name": "rust-jsonschema", - "language": "rust", - "version": "0.18.0", - "documentation": "https://docs.rs/jsonschema", - "homepage": "https://docs.rs/jsonschema", - "issues": "https://github.com/Stranger6667/jsonschema-rs/issues", - "language_version": "1.80.0", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/hyperjump-io/json-schema": { - "name": "js-hyperjump", - "language": "javascript", - "version": "1.9.6", - "homepage": "https://json-schema.hyperjump.io/", - "issues": "https://github.com/hyperjump-io/json-schema/issues", - "language_version": "v22.5.1", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/ExodusMovement/schemasafe": { - "name": "js-schemasafe", - "language": "javascript", - "version": "1.3.0", - "homepage": "https://github.com/ExodusMovement/schemasafe", - "issues": "https://github.com/ExodusMovement/schemasafe/issues", - "language_version": "v22.5.1", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/tdegrunt/jsonschema": { - "name": "js-jsonschema", - "language": "javascript", - "version": "1.4.1", - "homepage": "https://github.com/tdegrunt/jsonschema", - "issues": "https://github.com/tdegrunt/jsonschema/issues", - "language_version": "v22.5.1", - "dialects": [ - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#", - "http://json-schema.org/draft-03/schema#" - ] - }, - "https://github.com/sourcemeta/jsontoolkit": { - "name": "cpp-jsontoolkit", - "language": "c++", - "version": "631ce15e", - "homepage": "https://github.com/sourcemeta/jsontoolkit", - "issues": "https://github.com/sourcemeta/jsontoolkit/issues", - "dialects": [ - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/python-jsonschema/jsonschema": { - "name": "python-jsonschema", - "language": "python", - "version": "4.23.0", - "documentation": "https://python-jsonschema.readthedocs.io/", - "homepage": "https://python-jsonschema.readthedocs.io/", - "issues": "https://github.com/python-jsonschema/jsonschema/issues", - "language_version": "3.12.4", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#", - "http://json-schema.org/draft-03/schema#" - ] - }, - "https://github.com/luposlip/json-schema": { - "name": "clojure-json-schema", - "language": "clojure", - "homepage": "https://github.com/luposlip/json-schema", - "issues": "https://github.com/luposlip/json-schema/issues", - "language_version": "1.11.0", - "dialects": [ - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - }, - "https://github.com/gregsdennis/json-everything": { - "name": "dotnet-jsonschema-net", - "language": "dotnet", - "version": "7.1.2", - "documentation": "https://docs.json-everything.net/schema/basics/", - "homepage": "https://json-everything.net/json-schema/", - "issues": "https://github.com/gregsdennis/json-everything/issues", - "language_version": "8.0.7", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#" - ] - }, - "https://github.com/reactivecore/rc-circe-json-schema": { - "name": "scala-rc-circe-json-validator", - "language": "scala", - "version": "0.4.1", - "homepage": "https://github.com/reactivecore/rc-circe-json-schema", - "issues": "https://github.com/reactivecore/rc-circe-json-schema/issues", - "language_version": "22.0.2+11", - "dialects": ["https://json-schema.org/draft/2020-12/schema"] - }, - "https://github.com/santhosh-tekuri/boon": { - "name": "rust-boon", - "language": "rust", - "version": "0.6.0", - "documentation": "https://docs.rs/boon", - "homepage": "https://github.com/santhosh-tekuri/boon", - "issues": "htps://github.com/santhosh-tekuri/boon/issues", - "language_version": "1.80.0", - "dialects": [ - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2019-09/schema", - "http://json-schema.org/draft-07/schema#", - "http://json-schema.org/draft-06/schema#", - "http://json-schema.org/draft-04/schema#" - ] - } -} From 8ee7b90e7b4e428100d70e35a97f4187306691b1 Mon Sep 17 00:00:00 2001 From: Adwait Date: Wed, 7 Aug 2024 22:49:12 +0530 Subject: [PATCH 4/4] fix json schema for implementations metadata file of json-schema.org --- .../schemas/api/v1/json-schema-org/implementations.json | 8 ++++---- .../schemas/api/v1/json-schema-org/implementations.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bowtie/schemas/api/v1/json-schema-org/implementations.json b/bowtie/schemas/api/v1/json-schema-org/implementations.json index 9e62297ca..d47b4b605 100644 --- a/bowtie/schemas/api/v1/json-schema-org/implementations.json +++ b/bowtie/schemas/api/v1/json-schema-org/implementations.json @@ -43,10 +43,10 @@ "type": "string", "format": "uri" } - }, - "required": ["supported_versions", "dialects_compliance"], - "additionalProperties": false - } + } + }, + "required": ["supported_versions", "dialects_compliance"], + "additionalProperties": false } }, "required": ["id", "dialects", "badges_urls"], diff --git a/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json b/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json index 9e62297ca..d47b4b605 100644 --- a/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json +++ b/bowtie/tests/fauxmplementations/lintsonschema/schemas/api/v1/json-schema-org/implementations.json @@ -43,10 +43,10 @@ "type": "string", "format": "uri" } - }, - "required": ["supported_versions", "dialects_compliance"], - "additionalProperties": false - } + } + }, + "required": ["supported_versions", "dialects_compliance"], + "additionalProperties": false } }, "required": ["id", "dialects", "badges_urls"],