-
-
Notifications
You must be signed in to change notification settings - Fork 222
feat: Re-design of the Preprocessor to Reach and Strip all Examples in the Schema #1051
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: master
Are you sure you want to change the base?
feat: Re-design of the Preprocessor to Reach and Strip all Examples in the Schema #1051
Conversation
I also just tested this with a larger project of my own, and with the relatively complex schema there I did not find any issues. Doesn't mean that all edge cases have been covered, but should be a good indication. |
@max-at-silverflow this is a large change. What is your confidence, particularly regarding the series work? |
Yeah, it is quite a chunk... So, from my perspective, I can say the following:
Neither of this is conclusive, obviously. And considering the user base of this project, I would rather not promise that it is perfect and bug-free. I have spent significant effort to make it as stable as possible, but I have done this change on my own, so it was only a single pair of eyes. If I had to make a decision here, I would probably opt for a beta release, if you have that option. That would give the opportunity to gather some more feedback in the wild. And if anyone else wants to give their feedback, that is obviously also more than welcome! Let me know what you think! Edit: It also has to be said that I am not an expert with OpenAPI or validation. I have tried to stick to the original behavior as much as possible, and only expand it over the entire schema. |
This MR is a spin-off of #1040, and aims to fix #931. It introduces the following changes:
prettier
in the types file).The changes are quite extensive. The new preprocessor serves as a drop-in replacement, but changes how the schema is traversed. Most importantly, it traverses much more of the schema than the old design, which is required to reach all examples. In turn, it only requires a single pass to perform pre-processing and stripping all examples, in contrast to the simpler solution provided in #1040.
If you have any questions about it, let me know!
Closes #931.
Replaces #1040.