flowup / api-client-generator

Angular REST API client generator from Swagger YAML or JSON file with camel case settigs
MIT License
115 stars 21 forks source link

Regression for required fields #76

Closed Azuka closed 5 years ago

Azuka commented 5 years ago

Hi. The recent update in #75 seems to have broken the generation. Even with required attributes set, all models are generated with all fields optional. Do you mind taking a look?

vmasek commented 5 years ago

Hi @Azuka, can you please share the model definition? Does that happen in method parameter or response?

If it is response it has to be marked differently than the parameter for required property. See the example of ItemList in tests (model and definiton)

Or example for method getItems params where they are both required (method params and method definition)

Azuka commented 5 years ago

Thanks @vmasek for your very prompt response, and sorry for my late one. I looked at the definitions and realized none of the models were marked required.

I'll stick to 4.1.0 for now.