My yaml file contains the following string property named "hash":
When I try to generate swift5 code with objcCompatible=true, the code is generated okay:
openapi-generator generate -g swift5 -i "${YAML_FILE}" -o "${SWIFT_PATH}" --additional-properties=objcCompatible=true
But Xcode complains about the generated field named "hash":
Property 'hash' with type 'String' cannot override a property with type 'Int'
This does not happen with objcCompatible=false.
Generator version:
openapi-generator-cli 4.3.1
commit : 003165c
built : 2020-05-06T09:38:39Z
Suggested fix:
I would add "hash" in the objcReservedWords list here, but not sure that works:
|
objcReservedWords = new HashSet<>( |
My yaml file contains the following string property named "hash":
When I try to generate swift5 code with objcCompatible=true, the code is generated okay:
But Xcode complains about the generated field named "hash":
This does not happen with objcCompatible=false.
Generator version:
Suggested fix:
I would add "hash" in the objcReservedWords list here, but not sure that works:
openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java
Line 138 in 2578ef5