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

Improve handling of default value in responses for successful status codes #199

Open
zloit opened this issue Sep 12, 2023 · 0 comments
Open

Comments

@zloit
Copy link

zloit commented Sep 12, 2023

Hello,

I have noticed a potential issue with your OpenAPI code generator regarding the interpretation of the default value in the responses section.

The problem is that when there is no explicitly defined schema for the 200 status, the default value is considered as an error/unsuccessful response, whereas it would be logical to consider it as a successful response.

I propose the following changes:

  1. Improved interpretation of default: Make the default value be treated as a successful response when there are no explicitly defined schemas for the 200 status. This aligns with standard practice and meets developers' expectations for API responses.

  2. Documentation update: Clarify in the generator's documentation or README file how the default value is handled and how developers can use it for successful responses.

  3. Explain the changes: Describe in the CHANGELOG file or user guide that changes have been made regarding the interpretation of default and what benefits it brings.

The interpretation of the default value in the responses section is crucial for a proper understanding of API response schemas and the generation of client-side code that handles responses according to expectations. Clarifying this aspect will help developers make more effective use of your generator.

Thank you for your work on this generator, and I hope that the proposed changes will be considered.

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

No branches or pull requests

1 participant