SimplCommerce icon indicating copy to clipboard operation
SimplCommerce copied to clipboard

Better API spec in Swagger UI

Open thiennn opened this issue 6 years ago • 5 comments

We have added Swashbuckle to generate specs for SimplCommerce APIs #662. You can now see the generated spec in /swagger. The next step is enhance the APIs spec

thiennn avatar Nov 19 '18 14:11 thiennn

I’d like to work with this.

justindongqiang avatar Nov 26 '18 02:11 justindongqiang

@thiennn Trying to add the xml comment which generates the xml document displaying in swagger UI, but it does not seem to create the xml doc from xml comments.

justindongqiang avatar Nov 29 '18 18:11 justindongqiang

Many controllers actions are returning anonymous types, I think we convert to explicit type first to leverage ActionResult<T>.

About the xml doc, we can do it later

thiennn avatar Dec 03 '18 02:12 thiennn

Many controllers actions are returning anonymous types, I think we convert to explicit type first to leverage ActionResult.

If I may ask, why are the controllers returning anonymous types instead of strongly typed objects?

tavershimafx avatar Jun 23 '20 21:06 tavershimafx

Yes, it should return strongly typed. In the early days I return anonymous for faster coding. Now it should be refactored

thiennn avatar Jun 23 '20 22:06 thiennn