Open baronfel opened 7 years ago
I don't think TS node supports discriminator at the moment. Would you have time to contribute the enhancement? We can work with you on that.
cc @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx
@wing328 what's a discriminator? Also if we implement it, that would be nice to have in the base typescript generation instead of a particular client unless it is actually client based.
@wing328 no, it does with just a couple tweaks to the template that my company plans on contributing back. Mainly around the serialization/deserializing functions, having them check for desired type based on the presence or absence of the discriminator property. This is working well for us right now for describing variant types, but specifically the debug view of the models blows up when discriminator is used.
Description
Given a yaml definition that uses discriminators and
allOf
, I am unable to debug the models to work on templates.Swagger-codegen version
2.2.3, from homebrew.
Swagger declaration file content or url
Command line used for generation
java -DdebugModels=true -jar /usr/local/Cellar/swagger-codegen/2.2.3/libexec/swagger-codegen-cli.jar generate -i test.yaml -l typescript-node
Steps to reproduce
save the above spec as
test.yaml
and run the above command.Related issues/PRs
None that I could find.
Suggest a fix/enhancement
This doesn't stop normal operation, so template generate works fine. It's just the debug code can't handle this relationship.