Skip to content

[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

@kaynethkayneth commented Dec 18, 2019

Copy link
Copy Markdown
QA
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tickets-
LicenseMIT
Doc PRapi-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.

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

@soyukasoyuka 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.

lgtm, may you rebase?

@kayneth

Copy link
Copy Markdown
Author

Ok, done. Thank you

Base automatically changed from master to mainJanuary 23, 2021 21:59
@alanpoulain

Copy link
Copy Markdown
Member

Done by #3402.

Sign up for freeto 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

@kayneth@alanpoulain@soyuka