Open
Conversation
Collaborator
Author
|
This is failing to validate known valid manifests: essentially, it's failing to validate CustomElementDeclarations in any circumstances |
Collaborator
Author
|
For future reference here's the fish script i'm using to test. i have to be on cem branch feat/verify from bennypowers/cem#53 npm run build:schema
for s in valid-manifest invalid-attribute
set TEST_SCHEMA ~/Developer/cem/cmd/test/fixture/$s/custom-elements.json
cat $TEST_SCHEMA
ajv --strict=false \
-s ~/Projects/custom-elements-manifest/schema.json \
-d $TEST_SCHEMA
end |
828cfdd to
7b9265b
Compare
Collaborator
Author
|
Ok so with some mild schema.d.ts changes, and the with more aggressive if/then/else (maybe through a postprocessing step) we could do better: there really should only be one validation error here (attribute name missing), not several (also, it's not a function decl, etc) |
Collaborator
Author
|
I've patched ts-json-schema-generator in this PR to produce the kinds of output we want: |
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.
Uh oh!
There was an error while loading. Please reload this page.