-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[swift5] Add property x-null-encodable
extension for full control over encoding value/nil or nothing
#11141
[swift5] Add property x-null-encodable
extension for full control over encoding value/nil or nothing
#11141
Conversation
x-null-encodable
extension for full control over encoding value/nil or nothing
modules/openapi-generator/src/main/resources/swift5/modelObject.mustache
Outdated
Show resolved
Hide resolved
...es/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift
Outdated
Show resolved
Hide resolved
@jarrodparkes one question, this only applies to properties that can be nil or applies to all properties? |
This behavior applies to properties earmarked as
|
So this will basically override/ignore the |
@4brunu yeh, more or less. the spec example doesn't make that clear because |
@4brunu I was able to restore the default values 👍 let me know what you think |
...-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml
Show resolved
Hide resolved
.../openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
Outdated
Show resolved
Hide resolved
@jarrodparkes overall this looks good to me, I just left some small comments on some improvements/questions |
CI is failing, but it looks like it's not related to this PR. |
@4brunu sure thing |
That's weird the CI failed again with a different error this time, that is still not related to this PR (I think) |
@4brunu yeh, seems like that might be an issue across a few different PRs. @wing328 still curious, if you might have some insights on the following... TL;DR - In |
@4brunu let me know if there anything else you need to see here. AFAIK the failed check isn't related to this PR |
Restarted the bitrise job. Let's see how that goes. |
bitrise job passed via https://app.bitrise.io/build/6c82ea06-8680-4bd4-8079-b94726e9ea98 |
Looks good to me 👍 |
Attempts to solve #11033
This PR adds a new property vendor extension
x-null-encodable
for use with theswift5
generator. If set to true, then the generated properties will use theNullEncodable<Wrapped>
type:This type gives the client full control of whether to encode a value/null -OR- encode nothing.
PR checklist
Core Team Members
@jgavris
@ehyche
@Edubits
@jaz-ah
@4brunu