domaindrivendev / Swashbuckle.AspNetCore

Swagger tools for documenting API's built on ASP.NET Core
MIT License
5.25k stars 1.31k forks source link

What kind of IParameter for Operation? #303

Closed cryo75 closed 7 years ago

cryo75 commented 7 years ago

I'm migrating to AspNetCore, and I encountered a problem. What is the concrete class that implements IParameter for OpeationFilter?

As in:

operation.Parameters.Insert(0, new IParameter
{
    name = "token",,
    @in = "header",
    required = true,
    type = "string"
});`
domaindrivendev commented 7 years ago

This is OSS. Don't be afraid to peak at the code :)

https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/src/Swashbuckle.AspNetCore.Swagger/Model/SwaggerDocument.cs#L192

https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/src/Swashbuckle.AspNetCore.Swagger/Model/SwaggerDocument.cs#L214