Skip to content
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

feat(lex-cli): loosen the validation of the root document #3462

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

prenaissance
Copy link

This PR allows extra properties to be specified for lexicons at the root of the declaration file. Everything under the deps field still remains strictly validated.

Motivation

I've been trying to experiment with json schemas for the lexicon declarations in my project, and I realized that the codegen cli does not allow me to compile declarations with extra properties (including $schema):

Invalid lexicon /home/prenaissance/<some_path>/atproto/lexicons/comment.json
Issues at :
 - Unrecognized key(s) in object: '$schema'

The schema validators were made to use ZodSchema::strict() in #1088, in response to the issue from #1080, but allowing extra properties at the root level of the document would do no harm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant