Closed vitormattos closed 3 months ago
Can I go ahead and implement a test to check if openapi-typescript will build without problems?
Preferably the logic is not duplicated with the code above, since it is exactly the same and only operates on a different part of the spec.
Could you comment more about this?
Can I go ahead and implement a test to check if openapi-typescript will build without problems?
Yes that would be nice, I thought about extending our current checks against existing repos by running openapi-typescript inside them if they use it. That should at least prevent regressions.
Could you comment more about this?
The logic is the same as a few lines above but complex enough that it should not be implemented twice.
Yes that would be nice, I thought about extending our current checks against existing repos by running openapi-typescript inside them if they use it. That should at least prevent regressions.
What you think about put this in a separated PR to don't mix with the context of this PR? I understand that tests are very important but would be best separate the scope to merge this fix more quickly.
The logic is the same as a few lines above but complex enough that it should not be implemented twice.
Did you have any suggestion to this? This file isn't object oriented, is a point that make the reuse of code a bit complex. To prevent a duplication of code, maybe the both loop could be moved to Helper class.
What you think about put this in a separated PR to don't mix with the context of this PR? I understand that tests are very important but would be best separate the scope to merge this fix more quickly.
Yes, but a simple test for this fix still needs to be added to this fix.
Did you have any suggestion to this? This file isn't object oriented, is a point that make the reuse of code a bit complex. To prevent a duplication of code, maybe the both loop could be moved to Helper class.
Can be done easily by putting all elements into a single array and then looping over them instead of looping over them separately.
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
(If you believe you should not receive this message, you can add yourself to the blocklist.)
Scope
Have schemas that only exists at requestBody and at this case, if we don't fetch from body will throw an error "Can't resolve $ref" when run openapi-typescript build.
How to reproduce
Expected behavior
Actual behavior
Artifacts
Without fix
With fix
Tests
Considering that the test only build the json files and not the ts files, I didn't implemented tests.