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

simplification of sigmf-schema.json #337

Open
gmabey opened this issue Jan 31, 2025 · 3 comments · May be fixed by #338
Open

simplification of sigmf-schema.json #337

gmabey opened this issue Jan 31, 2025 · 3 comments · May be fixed by #338

Comments

@gmabey
Copy link
Contributor

gmabey commented Jan 31, 2025

I reworked the schema to not use "anyOf" sections, and it seems to work ok still.
However, I suspect that there's something I don't understand about JSON schema; this is my first exposure to it.
As I am using json-schema-validator, this change results in the error descriptions being intelligible ...

@gmabey
Copy link
Contributor Author

gmabey commented Jan 31, 2025

I'm not github savvy enough to know how best to link this PR, since it builds on another PR ... https://github.com/gmabey/SigMF/tree/removed_anyOf

@Teque5
Copy link
Collaborator

Teque5 commented Feb 3, 2025

According to this the keywords are anyOf, oneOf, allOf, not. Does removing this imply anyOf? Not sure.

I don't have a strong feeling on it, but are there cases where we may want to use one of these other keywords? Will removing anyOf preclude that?

When I initially wrote the schemas I used this tool if it's helpful.

@gmabey
Copy link
Contributor Author

gmabey commented Feb 4, 2025

My best understanding (right now) is that anyOf is more important of a feature when enforcing things that are more complicated than the presence of properties, which AFAICT we indicates through the use of required and additionalProperties.
Please don't ask me what I'm alluding to when I say "things that are more complicated" ... :-D
I can say for sure that with the validators I've applied, the commit seems to still enforce the optional/required nature that we understand to be appropriate.

@gmabey gmabey linked a pull request Feb 4, 2025 that will close this issue
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 a pull request may close this issue.

2 participants