Replies: 3 comments 14 replies
-
Thanks for doing this research. It's worth noting here that using 2019-09 or 2020-12 is currently problematic, as most IDEs do not properly support it. See just a few examples:
|
Beta Was this translation helpful? Give feedback.
-
Shall we consider to contribute to those IDEs to get that support added? |
Beta Was this translation helpful? Give feedback.
-
This is very interesting data. Thank you for sharing it. However, I'd like to add a little context so people don't draw the wrong conclusions. It's important to keep in mind that data from schemastore.org is not representative of JSON Schema version usage as a whole. A very tiny fraction of schemas end up in schemastore.org. It only represents one small use-case for JSON Schema. The niche schemastore.org fills is that it's schemas are used by IDEs to provide hints for things like common configuration files (Example: package.json). This is just one use case for JSON Schema and a relatively minor one. Other than representing only one small niche of JSON Schema usage, data from schemastore.org is skewed in a couple other ways. First, users are limited by what IDEs support. The The other way schemastore.org skews the results is that it's README tells people to use the oldest version they can when uploading schemas. This ends up being bad advice because many implementations are dropping support for older versions. Given all that, the only conclusion I think can be drawn from this data is that draft-07 is the most recent version that's well and reliably supported in IDEs (which we already knew). I don't think this data can tell us anything about version trends in general and doesn't tell us what versions people prefer if they weren't limited by the IDEs. Some additional observations from the data:
|
Beta Was this translation helpful? Give feedback.
-
After analyzing all the schemas on schemastore.org and the referenced or incorporated subschemas, I got the following results:
Number of evaluated files: 2301
Size of evaluated files: 93Mb
json-schema.org
's own files were not included.Detailed result:
Usage grouped by target:
I also analyzed the presence of dynamic refs in the files, the only files that contain them are:
-https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json
-https://spec.openapis.org/oas/3.1/schema/2022-10-07
And those two files are in fact small variations of the same thing: OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0
Beta Was this translation helpful? Give feedback.
All reactions