schemas: rm unused schema, dedupe sig vectors, more req'd fields, codegen in CI#215
Merged
schemas: rm unused schema, dedupe sig vectors, more req'd fields, codegen in CI#215
Conversation
It's unused, only `dsa_verify_schema_v1.json` has references under `testvectors_v1/`
Add more fields that are always present in the corresponding vectors to the schema required properties lists. Also be consistent in where we put the required & no additional properties elements.
Use go-jsonschema to generate Go code from the JSON schemas. We explicitly don't want to distribute that generated code, but it's helpful to verify that at least one tool is able to do codegen without error from the schema files. By asserting that there are no warnings we also catch cases where identical schema object names result in duplicate type definitions that require clunky suffixing. This is a strong indicator there's schema elements we should de-duplicate and catching these early helps make the schemas _and_ the generated code better.
Member
Author
|
@FiloSottile @sgmenda Would either of you be interested in reviewing this branch? I don't think any of it is particularly controversial. |
FiloSottile
approved these changes
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Similar to #214, this branch rolls up some more changes I found helpful when using the schemas to generate code to use for testing the Go standard library. There are no diffs to actual test vector content, just schemas.
dsa_verify_schema.json- this was leftover from thetestvectors/directory removed in Remove testvectors/ in favour of testvectors_v1 #169Option<T>vsTin Rust, or as a*Tpointer-type in Go).Multiple types map to the name "AsnSignatureTestVector"; declaring duplicate as "AsnSignatureTestVector_1" instead) - we don't want to be in the business of maintaining these generated types, so the result isn't checked in.