-
Notifications
You must be signed in to change notification settings - Fork 25
Correct JSON schema output #139
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
base: main
Are you sure you want to change the base?
Correct JSON schema output #139
Conversation
This is failing to validate known valid manifests:
essentially, it's failing to validate CustomElementDeclarations in any circumstances |
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
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) |
I've patched ts-json-schema-generator in this PR to produce the kinds of output we want:
|
Uh oh!
There was an error while loading. Please reload this page.