-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
[need] Add nullable property to openapi.yml #668
Labels
enhancement
New feature or request
help wanted
Contributions from the community are encouraged
question
Comments
liverocaisson
changed the title
[need] openapi.yml is not correct. Is it possible to add nullable to property
[need] Add nullable to property to openapi.yml
May 15, 2023
liverocaisson
changed the title
[need] Add nullable to property to openapi.yml
[need] Add nullable property to openapi.yml
May 15, 2023
Sure, can you send in a PR for this? |
@liverocaisson Any updates on a PR? |
Actually I don't know how to implement it in Scribe |
How far did you go, though? The Scribe codebase isn't difficult to get started with (some parts are tricky, yes, but the OpenAPISpecWriter is one of the more straightforward parts). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
help wanted
Contributions from the community are encouraged
question
Scribe version
4.19.1
Your question
First, thank you for maintaining scribe.
The generated openapi.yml is not usable in swagger or spotlight if there's a property with null value.
Those properties are reported as errors.
OpenAPI v3 allow to use null value by adding the property "nullable".
https://stackoverflow.com/questions/48111459/how-to-define-a-property-that-can-be-string-or-null-in-openapi-swagger
As suggested bellow:
If we use nullable property, the error is resolved.
It would be very useful if we can set properties as nullable in the specification of parameters with Scribe.
https://scribe.knuckles.wtf/laravel/documenting/query-body-parameters
Thank you.
Docs
The text was updated successfully, but these errors were encountered: