-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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 use json type for any #9206
Swift5 use json type for any #9206
Conversation
6c02cd5
to
4a3c0b5
Compare
@4brunu looks like it's unable to pull one of the dependencies
|
To reset CI, try to close and open the PR. |
0e292af
to
6b665eb
Compare
.../openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
Outdated
Show resolved
Hide resolved
.../openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
Outdated
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/swift5/Extensions.mustache
Outdated
Show resolved
Hide resolved
6b665eb
to
0eecc43
Compare
AnyCodable does not conform to Hashable Flight-School/AnyCodable#45 this is stopping me from switching to AnyCodable |
Flight-School/AnyCodable#51 PR submitted and awaiting review |
You are fast 🙂 |
0eecc43
to
71858ef
Compare
I updated the PR to conform all to Hashable |
9e19eab
to
5a3fe1a
Compare
I've reverted the mapping change. Just an FYI, swagger codegen swift5 generator also maps |
@aymanbagabas why did you revert the map of binary to Data? |
Two more thighs:
|
5a3fe1a
to
679c852
Compare
@4brunu CI is failing even though I updated the test files to reflect the new mapping. Do you know what's going on? EDIT: I noticed it passes when I also map |
I think you need to update the unit tests in those two places Lines 90 to 93 in 53e5986
Lines 109 to 110 in 53e5986
|
But I already did https://github.com/OpenAPITools/openapi-generator/pull/9206/files#diff-fa265925df4a882b13f49697c23722899f0400726b9c12ae75d8a88a7151d89b |
I don't have the time to dig unto it now, but maybe it's related to this Lines 3210 to 3212 in 53e5986
EDIT: I tried to comment the line |
Shouldn't we map |
No, let's deal with this problem in a different PR, and we need to investigate more on this issue |
From reading the OAS3 specs, |
There is also this Lines 282 to 288 in 5359776
So essentially
|
679c852
to
1654742
Compare
1654742
to
68cd30f
Compare
68cd30f
to
75b522a
Compare
I've dropped the mapping commit in favor of #9308 |
Thanks 👍 |
@wing328 for me this PR is ready to merge |
@@ -342,7 +342,15 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, | |||
final Schema additionalProperties = getAdditionalProperties(schema); | |||
|
|||
if (additionalProperties != null) { | |||
codegenModel.additionalPropertiesType = getSchemaType(additionalProperties); | |||
Schema inner = null; | |||
if (ModelUtils.isArraySchema(schema)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aymanbagabas could you please explain what this change does? (the code block, not the line itself)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was getting the wrong inner type for additionalProperties
when the schema is either an array or a map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining the change 🙂
Any
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
,5.1.x
,6.0.x