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

[native_assets_cli] Should then protocol extension schemas not 'extend' the base schema? #2085

Open
dcharkes opened this issue Mar 10, 2025 · 1 comment · May be fixed by #2093
Open

[native_assets_cli] Should then protocol extension schemas not 'extend' the base schema? #2085

dcharkes opened this issue Mar 10, 2025 · 1 comment · May be fixed by #2093

Comments

@dcharkes
Copy link
Collaborator

#2064 (comment)

In #2064 the protocol extensions extend the base schema. This means that if we combine two extensions together we would run validation rules twice. It could be cleaner if the extensions don't actually $refer to the base schema.

On the other hand, not referring to the base schema means it's not immediately visible that this is meant as an extension. So, we'd lose that explicitness.

For correctness it doesn't matter, running the same validation rules doesn't change the semantics.

For performance it might or might not matter. Validators should/could be optimizing redundant checks away. Using deep stacks allOf and anyOf seems fairly common in schemas. And running 600+ tests runs <1.0s in that PR.

@dcharkes
Copy link
Collaborator Author

From a discussion with @mkustermann

We could define a schema for the config and asset extensions and then generate the full extension schemas.
Moreover, we could then generate a full schema for all extensions.

@dcharkes dcharkes linked a pull request Mar 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant