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

Reference following in schema generator #52

Open
Tracked by #41
robere2 opened this issue Dec 3, 2023 · 1 comment
Open
Tracked by #41

Reference following in schema generator #52

robere2 opened this issue Dec 3, 2023 · 1 comment
Labels
Module: Schemas Issues pertaining to the @mcsb/schemas package. Priority: High Issues which are halting multiple issues, greatly hindering users, or are a minor security issue. Type: Enhancement Issues that are about a way in which the application can be improved.
Milestone

Comments

@robere2
Copy link
Owner

robere2 commented Dec 3, 2023

The way the schema generator works currently is it assumes the top level of each schema is correct, and then individually processes each schema definition, mapped from the API response.

If our schema generator is able to follow references, this would allow us to not apply any special logic to the top-level definitions in schemas. It would also allow us to validate the top level of the JSON response.

@robere2 robere2 added Type: Enhancement Issues that are about a way in which the application can be improved. Priority: Medium Issues which aren't critical or security-related but are holding back other issues or efficiency. Module: Schemas Issues pertaining to the @mcsb/schemas package. labels Dec 3, 2023
@robere2 robere2 changed the title Ideally, the schema generator would be able to follow refs. This may be simple recursion. While it'll likely never happen, we might want to add checks for circular references. Reference following in schema generator Dec 3, 2023
@robere2
Copy link
Owner Author

robere2 commented Dec 4, 2023

Also worth mentioning that this would likely allow us to significantly decrease schema sizes. There's a lot of repetition within some schemas which we want to eliminate. We could do this using pattern properties, but this would eliminate the strict definitions that allow IDE auto-completion.

@robere2 robere2 added Priority: High Issues which are halting multiple issues, greatly hindering users, or are a minor security issue. and removed Priority: Medium Issues which aren't critical or security-related but are holding back other issues or efficiency. labels Dec 4, 2023
@robere2 robere2 modified the milestones: api@1.0.0, schemas@1.0.0 Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Schemas Issues pertaining to the @mcsb/schemas package. Priority: High Issues which are halting multiple issues, greatly hindering users, or are a minor security issue. Type: Enhancement Issues that are about a way in which the application can be improved.
Projects
None yet
Development

No branches or pull requests

1 participant