FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[OpenAPI] Add nullable property description by kayneth · Pull Request #3312 · api-platform/core · GitHub

[OpenAPI] Add nullable property description - #3312

Closed
kayneth wants to merge 1 commit into
api-platform:mainfrom
kayneth:patch-1
Closed

[OpenAPI] Add nullable property description#3312
kayneth wants to merge 1 commit into
api-platform:mainfrom
kayneth:patch-1

Conversation

kayneth commented Dec 18, 2019
edited
Loading

Copy link
Copy Markdown
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tickets -
License MIT
Doc PR api-platform/docs#...

While trying to generate a client with Jane, I encountered a missing piece of OpenAPI 3.0 for nullable properties. It's useful in order to generate models with nullable getters.

As stated on src/JsonSchema/SchemaFactory.php:173: "externalDocs is an OpenAPI specific extension, but JSON Schema allows additional keys, so we always add it" for the property schema.
Then we could also add the nullable feature.

Another take, would be to considered each components schema non required properties as optional. Therefore, I should make a PR to Jane in order to use non-required properties instead of nullable properties to generate models. But this is not a desired behaviour on their side.

kayneth changed the title [JSONSchema] Add nullable property description [OpenAPI] Add nullable property description Dec 18, 2019
kayneth marked this pull request as ready for review December 18, 2019 13:22

soyuka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm, may you rebase?

kayneth commented Dec 20, 2019

Copy link
Copy Markdown
Author

Ok, done. Thank you

Base automatically changed from master to main January 23, 2021 21:59

Copy link
Copy Markdown
Member

Done by #3402.

alanpoulain closed this Mar 9, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL