-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Publish on schemastore.org #3
Comments
We're now testing with json_schemer, it provides error messages that are more or less readable for human. But we can't expect more from a parser right? We're using it also in other products and customers seems satisfied as far as I know. Concerning the contribution to the schemastore, it sounds great. We don't have to publish anything on the store, we can just add to the catalog the link to the schema in this repo. What do you think @aslakhellesoy? |
I think we do. Your schema currently fails to reject documents with missing properties. It will actually validate this: [{}] That’s not very useful at all. A consumer of the document would not get any reassurances from the schema regarding the presence of properties. As a result, you have to check each the presence of each property in the code. This should be the job of the schema! You should make most of the properties in the schema We need tests for this. In fact, most of the tests should be about what the schema rejects, not about what it accepts. Once you do this, you will find that the schema will accept documents from certain Cucumber implementations/versions and reject others. At this point we have to make different schemas for each Cucumber implementation and version range. Different versions and implementations of Cucumber (including some other tools) produce JSON documents that are structured differently. The format was never specified in a schema, and has diverged in different implementations and versions. @vincent-psarga knows all about this. So you may have to validate a document against multiple schemas until you find one that matches. Then you can say «this one looks like it came from Cucumber-JVM version range 3.2 - 4.5. With this knowledge, you can process the documents with much more confidence. |
In our product, we don't need to know which cucumber framework have produced the report. We just want to make sure we will be able to extract data we need. |
The https://github.com/SchemaStore/schemastore project is a repository of JSON Schemas. It has wide industry and a vibrant community of tools around it.
We should publish the schema here. Before we do, let’s discuss naming and versioning schemes.
Publishing should be automated, perhaps a GitHub Action that creates a PR when a tag is pushed.
This is also related to #1 where I suggest we remove the Ruby code. For testing that the schemas accept good json documents and reject bad ones, I suggest we try one of these:
We should pick the one that gives the best errors.
The text was updated successfully, but these errors were encountered: