12,423 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
54
views
How to enable the "Authorize" button in Swagger in .NET 10?
Recently, I've been trying to create a server with .NET 10 and I want to use Swagger to support the documentation, but I'm having problems with JWT authentication.
How do I enable the "Authorize&...
0
votes
2
answers
82
views
How to prevent cyclic dependency with sealed interface in java spring boot swagger generation?
Using Spring Boot I've an endpoint which exposes a union type, here is how I wrote it
// Union.ts
import io.swagger.v3.oas.annotations.media.Schema;
@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION)
@...
2
votes
1
answer
63
views
ASP.NET Swagger operationfilter security clearing does not remove padlock
I am trying to remove the padlock from some of the APIs from my collection
My Swaggergen is built:
builder.Services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", ...
10
votes
1
answer
2k
views
Authentication not working in Swagger with .NET 10
Previously when using .NET 9, I could authenticate in Swagger using an Authorize button and auth-protected endpoints would have a "lock" icon on them:
But now when using .NET 10 and latest ...
0
votes
0
answers
27
views
Swagger Caching Authentication parameters
I have an ASP.NET Core Web API. I am using Swagger, so when I run my app in debug mode, the Swagger page appears and I can test my endpoints. I also have authentication, and crucially, I'm ...
1
vote
1
answer
113
views
How to auto login in Swagger API in development mode?
I want to not get token from login endpoint in Swagger every time I run and debug the API code. I have added this code to the program.cs file to get authenticated, but when I test an endpoint with an [...
2
votes
1
answer
66
views
ASP.NET Core 8 IProblemDetailsWriter fails when using [ProducesResponseType(typeof(T), 201)]
I have an ASP.NET Core Web API controller action that returns a 201 Created response with a custom type, and I also have a custom exception handler that writes ProblemDetails for 400–500 errors.
The ...
0
votes
1
answer
46
views
"No operations defined in spec!" when using MMLib.SwaggerForOcelot to build combined swagger for Ocelot
This is my ocelot configuration...
{
"Routes": [
{
"UpstreamPathTemplate": "/api/test/{url}",
"DownstreamPathTemplate": "/api/{url}",...
0
votes
1
answer
77
views
Swagger in springboot3- No API Definition Provided
I have a spring boot 3 application and I have added springdoc-openapi dependency ie
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-...
Best practices
1
vote
3
replies
229
views
Best Practice: use of allOf in OpenAPI specification
I'm currently in a Project designing/extending an API for a customer. At some points, the existing Definiton uses the allOf Keyword in the schemas to combine different Subschemas, e.g.:
"Foo"...
0
votes
1
answer
75
views
How to configure multiple security schemes in ASP.NET Core Swagger with NSwag API spec
I have an ASP.NET Core 8 Web API with a Swagger page using Nswag + OpenAPI3. I also have an OAuth2 security implementation which is working great. Thanks to AspNetCoreOperationSecurityScopeProcessor ...
1
vote
0
answers
62
views
RestController post endpoint multipart_form_data with @ParameterObject and MultipartFile can't be executed from Swagger-UI
I have a class with the @RestController annotation which contains an endpoint defined like this
@PostMapping(path = "/submitJob", consumes = { MediaType.MULTIPART_FORM_DATA_VALUE }, ...
-2
votes
1
answer
113
views
Ted EU Swagger API request returns 500 error even for a basic query [closed]
I’m trying to setup API requests for the Ted EU service. They have an example site to test out requests: https://ted.europa.eu/api/documentation/index.html#/notice-search-v3/search . But even trying ...
0
votes
0
answers
71
views
Issues with polymorphis in Swagger (springdoc) in Spring Boot after upgrading to 3.5
I have created a very simple demo project with one controller endpoint:
Spring Boot 3.5.6
Springdoc 2.8.13
This was working much better in Spring Boot 2.7.x
Full project here: https://github.com/...
1
vote
1
answer
59
views
Duplicated parameters in OpenAPI documentation
I'm just starting out with OpenAPI and learning about the different annotations in version 3.0 using Javadoc, as I haven't found any posts specifically about them.
If I use the parameters parameter in ...