Models generation based on openapi spec.
To regenerate models from openapi definition, clone latest open api definitions and use next command from the project root.
./update-models.sh
- The generator does not generate long enums, the problem is solved by adding the edited template modelEnum.mustache.
- When generating oneOf schemas, the generator creates its own abstract class, which does not look like it would like. The problem was solved by replacing the abstract generator class with ours using typeMappings in the generator config.
- The generator sets the discriminator name incorrectly, the problem is solved by adding and editing the modelGeneric.mustache template.
- Changes have also been made to modelsGeneric.mustache to exclude unspecified fields from JSON when serializing a class.
To solve new problems, use the generator settings (csharp, common) and templates.
Do not edit the generated files! They will be overwritten after generation!