"Answers": {
"type": "object",
"required": [
"houseLiving",
"liabilityLegalProtection",
"pets"
],
"properties": {
"houseLiving": {
"type": "string",
"enum": [
"RENTED",
"OWN_HOUSE",
"OWN_FLAT",
"PARENTS_HOUSE",
"SHARED_FLAT",
"RENT_FREE"
]
},
"liabilityLegalProtection": {
"type": "array",
"items": { "type": "string", "enum": ["BUILDER", "LANDLORD"] }
},
"pets": {
"type": "array",
"items": {
"type": "string",
"enum": ["DOG", "CAT", "HORSE", "AQUARIUM"]
}
}
},
"title": "Answers"
}
type HouseLiving
= HouseLivingRENTED
| HouseLivingOWNHOUSE
| HouseLivingOWNFLAT
| HouseLivingPARENTSHOUSE
| HouseLivingSHAREDFLAT
| HouseLivingRENTFREE
type LiabilityLegalProtection
= LiabilityLegalProtectionLiabilityLegalProtectionLiabilityLegalProtectionLiabilityLegalProtectionBUILDER
| LiabilityLegalProtectionLiabilityLegalProtectionLiabilityLegalProtectionLiabilityLegalProtectionLANDLORD
type Pets
= PetsPetsPetsPetsDOG
| PetsPetsPetsPetsCAT
| PetsPetsPetsPetsHORSE
| PetsPetsPetsPetsAQUARIUM
The actual output for LiabilityLegalProtection and Pets should only add the prefix a single time.
v4.0.0-beta3
docker run --rm \
-v "$PWD:/local" \
openapitools/openapi-generator-cli:${OPEN_API_VERSION} generate \
-i /local/swagger.json \
-o "/local/$SDK_DIR/$generator" \
-g "$generator" \
--invoker-package "crm" \
--additional-properties elmEnableCustomBasePaths=true \
--additional-properties elmPrefixCustomTypeVariants=true
A fix would be to check if the prefix is already part of the value. This will work, but will not remove the root cause. It seems that certain cases leed to concatenating the prefix 4 times. In other cases it's working fine.
@eriktim What do you think?
Thanks for reporting this @andys8 !
I something miss some FP here, so I am not particularity proud of my fix...
Most helpful comment
Thanks for reporting this @andys8 !
I something miss some FP here, so I am not particularity proud of my fix...