Nohcs777's avatar
Nohcs777
Regular Visitor
7 years ago
Status:
New Idea

ASPNet5 Code Generation: Separate resource files for API operation descriptions

The generation of c# puts descriptions in the <Remarks> tag for the operation on the controller.  This is ok but it tends to pollute the code and doesn't preserve the white space of the markdown.  We'd like to have swaggerhub generate resource files that we can link into our c# micro-service and use the swashbucke IDocumentFilter to read those files from code resources and provide them in swagger output.  This would also allow us to handle localization concerns in the future much more effectively.

 

Why: because once we generate the code, we push our micro-service through our continuous delivery process and only publish to our gateway from the micro-service host swagger.  So the format of those descriptions need to be maintained and presented by the code itself.