Questions tagged [openapi.net]
19 questions
58
votes
1 answer
What is Swagger, Swashbuckle and Swashbuckle UI
This is my understanding:
Swagger is a notation/rules to write documentation. But why is it called a framework (like Angular/MVC)?
Swashbuckle is a program (JavaScript?) that generates the documentation (based on Swagger rules).
Swagger UI…

Blue Clouds
- 7,295
- 4
- 71
- 112
12
votes
1 answer
.NET Core 2.0 Web API - How to add a custom header parameter in Swagger
As per the title - I've found examples of how to do this using regular .NET
E.g:
Web Api How to add a Header parameter for all API in Swagger
However, I can't find any examples, or documentation, showing how to accomplish the same thing when using…

marcusstarnes
- 6,393
- 14
- 65
- 112
6
votes
2 answers
How to Write ISchemaFilter for ProblemDetails in ASP.NET Core 3 & Swashbuckle 5?
I'm using ASP.NET Core 3.0 with Swashbuckle 5. I'm trying to write a ISchemaFilter for ProblemDetails in ASP.NET Core 3.0. ProblemDetails is returned for a lot of different status codes e.g. 400, 401, 403, 406, 415, 500 etc. I want to provide a…

Muhammad Rehan Saeed
- 35,627
- 39
- 202
- 311
6
votes
1 answer
Microsoft.OpenAPI examples or documentation?
Just tried to use Swashbuckle 5 rc2 + Microsoft OpenAPI implementation but struggling to make sense of how to inject the security requirements using the OpenApiSecurityRequirement via an OperationFilter
I'm converting the OperationFilter from…

Philip
- 923
- 7
- 19
3
votes
0 answers
Swashbuckle.AspNetCore Swagger [5.0.0 | OpenAPI 3.0] filter to set Consumes/Produces
While migrating to .NET Core 3.0 and Swagger 5.0.0-rc4 I need to re-implement following document filter:
internal sealed class CommonDocumentFilter : IDocumentFilter
{
public void Apply(SwaggerDocument swaggerDoc, DocumentFilterContext context)
…

Sergey Nikitin
- 845
- 2
- 13
- 25
2
votes
0 answers
Validating JSON messages against Swagger definition in .Net core
I created a REST API using a Swagger definition, now I need to validate incoming messages using that swagger schema. I found several solutions but not in .net
Is There any library in .net that can do it?
(like swagger-schema-validator in java)

haya
- 21
- 2
2
votes
0 answers
Perl Mojolicious persistent validation error "Properties not allowed: components, openapi, servers"
I'm looking at creating an api using OpenAPI V3 in Perl with Mojolicious. Both OpenAPI and Mojolicious are new to me.
Mojolicious::Plugin::OpenAPI looks to be under active development with the the latest version 3.31 being released less than a day…

jeffez
- 185
- 1
- 12
1
vote
0 answers
OpenApiRequestBody attribute doesn't render properly for multipart/form-data payload
I have a project in Visual Studio using the "Azure Functions" template and the "Http trigger with OpenApi" function, and want to use an OpenApiRequestBodyAttribute to indicate that the function requires a multipart/form-data request, where the…

Caleb Keller
- 553
- 3
- 19
1
vote
1 answer
How Can I Generate An OpenApiDocument from an assembly?
AWS Schema Registry (AWS EventBridge) requires OpenApi3 schema documents.
I have a dotnet assembly with types that are used for Detail of an AWS EventBridge message in an AWS Lambda Function assembly.
I would like to generate the OpenApi3 document…

Tim Bassett
- 1,325
- 1
- 12
- 23
0
votes
0 answers
swagger.json different for "api-docs/v1.0/swagger.json" and "api/swagger/v1/swagger.json" .Net 6.0 API
I am using .Net 6.0 with Open API Swagger packages. When I run my application, I find that "api-docs/v1.0/swagger.json" is just fine (However, I would like to tweak title, description etc.). At the same time, "api/swagger/v1/swagger.json" is almost…

user1748546
- 97
- 2
- 11
0
votes
0 answers
microsoft.dotnet-openapi : Generate yaml from command line
I have an Azure Function v4 .net 6 with an http trigger. I have some OpenAi attributes and would like to generate the yaml file to use it in pipeline.
From documetation…

FEST
- 813
- 2
- 14
- 37
0
votes
0 answers
Is there a way to generate openapi files in multiple folders?
For our vue/typescript based project, we use typescript-fetch generator to generate our .ts files from the .yaml files.
The way how this works out of the box, is that all generated files are dumped into 1 folder called models.
Want we want to…
0
votes
0 answers
Generate enum with open API 3.0
i have the below section in my yaml file for which i need corresponding enums generated. I intend to use the "somemap" as a response for the API.
somemap:
type: object
additionalProperties:
type: object
properties:
…

user1318369
- 715
- 5
- 15
- 34
0
votes
1 answer
openapi3 integration with webflux functional way is not working
I am trying to integrate openapi3 with reactive webflux functional endpoints. but i am always getting the error message "invalid version" from andother route configuration.andOther(route(RequestPredicates.all(), errorHandler::invalidVersion)). If i…

Srivi
- 243
- 4
- 14
0
votes
3 answers
SwaggerGeneratorException: Conflicting method/path combination "POST api/v{version}/Employee" for actions
I have problem when run swagger with this methods. Can you help me?
[HttpPost]
[ApiVersion("1.0")]
public IActionResult SetEmployeeV1()
{
v1 ...
}
[HttpPost]
[ApiVersion("2.0")]
…