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

Give an option to mark not required fields as nullable #635

Open
1 task done
gyz0072004 opened this issue Dec 5, 2022 · 1 comment
Open
1 task done

Give an option to mark not required fields as nullable #635

gyz0072004 opened this issue Dec 5, 2022 · 1 comment
Assignees

Comments

@gyz0072004
Copy link

gyz0072004 commented Dec 5, 2022

Checklist

  • Conversion: I have checked my source definition is valid OpenAPI 2.0

Detailed Description

Our API would return NULL value for optional fields in swagger definition. It's acceptable in OpenAPI 2.0. However, because the transformed OpenAPI 3.0 definition doesn't mark the field as nullable, the field becomes not nullable. We would like the toolkit to support auto marking the fields as nullable

Other stuff

swagger2openapi: 7.0.8

@MikeRalphson
Copy link
Contributor

Could you expand on why this behaviour was acceptable in OpenAPI 2.0 (it doesn't seem obvious to me). Optional and nullable mean different things here. My gut feeling is this isn't something I'd be likely to add, but please try and convince me!

@MikeRalphson MikeRalphson self-assigned this Feb 17, 2023
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

2 participants