swagger-angular-generator icon indicating copy to clipboard operation
swagger-angular-generator copied to clipboard

Generate forms for response types

Open pwen090 opened this issue 7 years ago • 0 comments

It looks like FormGroups are only generated for the inputs to web apis and not the response types?

So if we have a web api such as GetQuery([FromRoute] int id) that returns a class such as ExampleResponseQuery. The generated code would have a FormGroup for the int id input for GetQuery but there would be no FormGroup generated for ExampleResponseQuery. Therefore we have to manually generate a FormGroup for ExampleResponseQuery to display the results of the call to GetQuery?

Is there a configuration option to generate FormGroup's for any Model defined in our swagger definition?

The project https://www.npmjs.com/package/swagger-ts-generator will generate a FormGroup for any model but it does not generate client services nor work as well as swagger-angular-generator. Hoping to not have to do some weird combination of generated content from both projects.

Thank you for any help!

pwen090 avatar Dec 07 '18 02:12 pwen090