Generate yaml swagger using Swashbuckle

Manny42 picture Manny42 · Jul 14, 2017 · Viewed 9.8k times · Source

I have had no problem getting a json file in my Web API project using Microsoft's tutorial.

Due to some requirement I would like to be able to retrieve a yaml file. But the problem is there is no hook I could find to make this possible.

Does anyone know any workaround for this problem?

Answer

VahidN picture VahidN · Sep 16, 2020

V 5.6 supports producing YAML files. How to use it:

app.UseSwaggerUI(x => { x.SwaggerEndpoint("/swagger/v1/swagger.yaml", "Zeipt Dashboard API"); });