frhagn / Typewriter

Automatic TypeScript template generation from C# source files
http://frhagn.github.io/Typewriter
Apache License 2.0
537 stars 132 forks source link

Does Typewriter work with ActionResult ? #348

Open joe-oli opened 1 year ago

joe-oli commented 1 year ago

For example, it is common to have C# controller Action-methods of the form public async Task<ActionResult<MyModel>> DoSomething() {}

I could not find any examples that would handle this.

AdaskoTheBeAsT commented 1 year ago

You can use attribute ProducesResponseType -> sample https://github.com/AdaskoTheBeAsT/NetCoreTypewriterRecipes/blob/master/src/AngularWebApiSample/Controllers/ComplexController.cs