Implementation badges to signal support and compliance #118
Replies: 3 comments 6 replies
-
How exactly would these badges work? Is it honor system, or would it be backed up by actual verifiable test results? If it's not backed by anything, there's no difference from what we have now, which is people making claims on their readme that even if honest are probably out of date. We'll have to think carefully about what we want those badges to say. "Partial compliance" can mean a lot of things. Many implementations (including mine) have reasons to make harmless deviations from the spec. I think calling my implementation partially compliant wouldn't be appropriate especially considering it would have the same status as an implementation with missing features or major bugs. Even including a percentage of tests passed wouldn't be quite right. We have several tests that cover behaviors that are technically part of the spec, but would never happen in a real schema. Implementations that fail those tests shouldn't have the same badge results as an implementation that fails the same number of tests, because of missing features or significant bugs. One way to address this could be to label each test with a severity label (severe, minor, trivial) and report on the number of each type of failure. Another approach could be feature based. So, if an implementation passes everything, but doesn't support dynamic references or external references or whatever, the badge would be specific about those missing features and users could be confident in the implementation if they don't rely on those features. But this is getting complicated already, but there might not be an uncomplicated way to do this.right. |
Beta Was this translation helpful? Give feedback.
-
There are some existing thoughts on this in json-schema-org/JSON-Schema-Test-Suite#314. |
Beta Was this translation helpful? Give feedback.
-
Issue json-schema-org/JSON-Schema-Test-Suite#314 is closed in favour of bowtie-json-schema/bowtie#211 which is linked to bowtie-json-schema/bowtie#55 I'm closing this Discussion as we have a solution to add badges based on actual running tests. |
Beta Was this translation helpful? Give feedback.
-
JSON Schema has a problem. New users find it hard to pick a library. Not because there aren’t enough to choose from, but because developers are unclear what versions of JSON Schema are supported, and how compliant the implementation is in reality.
When we receive a PR to add an implementation to our listing, they must also provide the versions of JSON Schema they support. We break up the listings, only showing those that support draft-07 and up on the main page, relegating implementations that only support older versions to a legacy page.
Even though knowing which version of JSON Schema an implementation supports is required, often the library does not self declare which version it supports in its own readme or documentation. Developers should be able to pick an implementation with a level of confidence in compliance with the specification as this ensures the level of interoperability they require.
Let’s try the simplest idea that has the highest gain to effort ratio. A simple badge.
https://shields.io is a long-time provider of many ready-made and dynamic badges for repository readme files. These are most well known for showing build status, warding off would-be users from projects which have a broken build without a fix for years.
I propose we create a number of ready to use badges for implementations to add to their readme, with varying levels of detail. We can investigate a number of improvements should the basic approach be successful and useful.
Here’s some examples of the most basic badge we could enable maintainers to construct.
(may be better using bar | )
(https://img.shields.io/badge/JSON%20Schema%20Version%20Support:-draft--07,%202019--09,%202020--12-green)
These would be self assertions.
We can shorten these by using the JSON Schema icon, which is supported by using a data URI base64 encoded image.
We can make these badges link to anywhere we like by default, although users could change them, or any of the contents, if they so wished. We can have the left side and right side go to different locations.
We could create a small webapp to allow these badges to be built easily by implementers, making them more likely to use it, and allow us to set style and link expectations.
It is also possible using the shields.io service to make badges dynamic. Although the test suite doesn’t publish releases as such, we could use commit hash, and include that in the badge URL, and compare it against the latest commit, to check how up to date the test suite is.
Beta Was this translation helpful? Give feedback.
All reactions