12,406 questions
0
votes
1
answer
66
views
Authorize filter attribute is returning signing key error, whereas it is 100% correct
I'm configuring authorization in my ASP.NET Core 8 project, and I get this error while testing JWT token auth via Swagger:
content-length: 0 date: Sun,12 Apr 2026 01:37:08 GMT server: Kestrel www-...
Advice
1
vote
3
replies
63
views
What is the correct way to build and run a command-line ASP.NET WebApplication?
I'm using Rider to develop a C# application that uses ASP.Net to create a simple web application. From inside the IDE, I can run and I get what I expect: A command-line application that runs in the ...
0
votes
0
answers
50
views
Using Swagger with Dropwizard - can't get non-root path to work correctly
We have a Dropwizard application which uses https://github.com/smoketurner/dropwizard-swagger to provide an interactive Swagger page. Normally we just serve the application on the root path and ...
Best practices
0
votes
2
replies
104
views
Best API documentation tool for a multi-service architecture (Swagger/OpenAPI vs Redoc vs Postman)?
I’m working on a backend system that follows a multi-service architecture (multiple microservices). Each service exposes its own REST APIs, and we want to provide clear and maintainable API ...
2
votes
1
answer
143
views
How to serialize Date in response without breaking Swagger / OpenAPI?
I'm building a NestJS API using the nestjs-zod package for request/response validation and Swagger generation.
I have a domain entity like this:
export class UserEntity {
constructor(
...
2
votes
0
answers
91
views
Swagger error 502 Bad Gateway, on NestJS/Railway [closed]
I'm getting a 502 Bad Gateway error when trying to access my Swagger API after deploying my NestJS backend to Railway.
Problem
The backend container starts fine, logs show the NestJS app is running ...
0
votes
1
answer
62
views
.yaml not added to group URL
When I change the property springdoc.swagger-ui.url to contain the .yaml extension, for example /v3/api-docs.yaml, I expect the URLs of the defined groups to include it as well.
For example, with the ...
2
votes
1
answer
56
views
What is the purpose of springdoc.group-configs[_].display-name if Swagger UI derives the group display name from SwaggerUrl instead
I'm trying to understand the relationship between groups and URLs in Springdoc.
For example, we might have the following Springdoc configuration:
springdoc.swagger-ui.urls[0].url=${springdoc.swagger-...
0
votes
1
answer
109
views
Swagger UI fails to load with "Internal Server Error /swagger/v1/swagger.json" on ASP.NET Core 9 with file upload endpoint
I have an ASP.NET Core 9 Web API with a file upload endpoint using IFormFile. When I launch the application, Swagger UI fails to load with this error:
Failed to load API definition.
Fetch error
...
0
votes
0
answers
119
views
Creation of semi-duplicate definitions leads to display problems (problem became visible when transitioning from springdoc 1.6.13 to springdoc 2.8.14)
When a Spring Boot application using springdoc-openapi-{common, ui, web-code, ...}:1.6.13 starts, it invokes the SwaggerWelcomeWebMvc class and later AbstractSwaggerWelcome, where ...
0
votes
0
answers
89
views
Swagger routing issue in API Gateway failed to load API definition
I have a Spring Boot microservices example containing config server, discovery server, API gateway and other services.
I can read all application.yml files from config-repo fetched by config server.
I ...
0
votes
1
answer
199
views
How to add OpenAPI/Swagger annotations in a Spring library consumed by Spring Boot apps?
I'm building a Spring library that will be consumed by other Spring Boot applications. This library exposes a REST interface, and I want the consuming apps to automatically see my endpoints in their ...
5
votes
0
answers
2k
views
The type or namespace name 'OpenApiReference' could not be found (are you missing a using directive or an assembly reference?)
I'm using .NET 10. I want to add an authorize button in Swagger, but I am encountering the following error:
The type or namespace name 'OpenApiReference' could not be found (are you missing a using ...
0
votes
1
answer
417
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
149
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
72
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", ...
26
votes
2
answers
10k
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 ...
1
vote
0
answers
49
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
203
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
124
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
60
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
90
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
581
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
161
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
70
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
163
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
90
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
105
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 ...
0
votes
0
answers
81
views
Kotlin/Spring Boot and Swagger Docs show inherence of data class models when using openapi-generator-maven-plugin (Polymorphic DTOs)
I’ve built a Spring Boot REST API that exposes an endpoint returning a list of animals (/animals).
The API supports multiple animal subtypes (Cat, Bird), each with unique fields, and I’ve modeled them ...
0
votes
0
answers
33
views
Duplicate records if Class and Operation both has @Path param
I have an API where the class and operation both has @path annotation ( @path("/{id}") ) as shown in following interface example. @path("/v1.0/private/communications") and @path(&...
-1
votes
1
answer
111
views
How to correctly define additionalProperties with example in l5-swagger / Swagger-PHP?
I am trying to document a Laravel API using l5-swagger (swagger-php). I have a request body where one property is a map of wallet IDs to effective dates, like this in PHP:
[
11 => "2025-12-...
0
votes
0
answers
993
views
GetSwagger does not have an implementation
I am getting the following error in the startup of my ASP.NET Core 9 Web API project:
System.TypeLoadException: 'Method 'GetSwagger' in type 'Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator' from ...
1
vote
0
answers
89
views
Documenting a Map<String,List<Thing>> properly with Swagger's Java annotations
I'm having trouble finding a solution to documenting a Map<String, List<Thing>> properly using Swagger annotations and Open API. Thing is annotated properly, but I cannot find the correct ...
1
vote
0
answers
110
views
Visual Studio debugger crashes when selecting IFormFile in Swagger UI
I'm running an ASP.NET API in Visual Studio. I have an endpoint to upload a file using IFormFile.
[HttpPost(Name = "AddDocument")]
[ProducesResponseType(StatusCodes.Status200OK)]
public ...
0
votes
0
answers
69
views
Marking error codes as retriable in OpenAPI
I want to mark some response codes in some operations of my REST API as retriable (the API specification described in OpenAPI). Is there a standard solution for this problem?
It would be great if ...
0
votes
0
answers
61
views
Groovy/Grails Ambiguous mapping error with springdoc swagger
This is my controller
package example.infra.adapters.input.api.v1.endpoints
import example.aplication.services.authentication.LoginAuthenticator
import example.aplication.dtos.authentication....
1
vote
1
answer
245
views
Api Platform generate non-required fields for id (and others)
I am using API Platform / Symfony (latest version) to manage my API.
Then, I use the @rtk-query/codegen-openapi library to generate my TypeScript typings.
The problem is that many fields are marked as ...
2
votes
1
answer
196
views
Is there any way to get Swagger document of a project without running it?
I want to download Swagger file of project X in my Analyzer project but I don't want to run project X.
I have access to project X's source code & I can build the solution.
I tried dotnet swagger ...
-2
votes
2
answers
420
views
API Endpoint with Request Body
I have set up a new API endpoint (shown below) that expects a JObject in the request body. I am working towards a more complex example, but currently am attempting this with a simple boolean object.
...
0
votes
0
answers
41
views
OAS Generator creates classes even for referenced schemas
I have two yml files
Common.yml and application.yml
Both under same folder
I have certain schemas like sortOrder that are defined in common schema
And using $ref it is referred in application.yaml
...
4
votes
2
answers
3k
views
Can't Target OpenAPI 3.x After Upgrading Swashbuckle.AspNetCore to v9.x
I'm trying to upgrade the Swashbuckle.AspNetCore package from version 7.3.2 to the latest version, which is currently 9.0.3, in an ASP.NET Core app targeting .NET 8. Note that this app will be ...
0
votes
2
answers
100
views
Laravel API: PUT request with multipart/form-data returns empty request when using Swagger or Postman [duplicate]
I'm working on a Laravel 10.x project with an API that allows updating an event using a PUT /events/{id} endpoint. This endpoint accepts multipart/form-data to optionally upload an image and pdf, and ...
1
vote
0
answers
83
views
How to add format, pattern and maxlength?
How do I add information to Swagger docs for:
format
pattern
max length
I was thinking just put them on a object and add attributes, but I need them to be a primitive because I am using them in the ...
1
vote
1
answer
488
views
After publishing, Swagger loads but doesn't display any endpoint
During local development, my ASP.NET Core 8 Minimal API project is operating without any issues. Swagger opens at /swagger, all endpoints are visible, and everything is testable directly from the user ...
1
vote
1
answer
437
views
How to receive an array of objects (with IFormFile) using [FromForm] in ASP.NET Core Web API?
I'm building an ASP.NET Core Web API endpoint that needs to receive an array of complex objects via multipart/form-data. Each object includes key-value string pairs and an optional file upload. Each ...
1
vote
0
answers
86
views
Hide parameter in Swagger doc but keep it for OpenAPI jar generation
I have a situation where I would like to not see a HTTP method parameter in the Swagger UI documentation, but still have it generated in my method signature by OpenAPI Java client generation.
I tried ...
1
vote
0
answers
109
views
Micronaut OpenAPI does not generate merged file using micronaut.openapi.additional.files from dependent module YAMLs
I'm trying to generate a single OpenAPI YAML file in an aggregator module that imports other Micronaut modules as dependencies.
Context
I have multiple modules (A, B, C) that define Micronaut ...
0
votes
0
answers
104
views
How to ignore field generation without specified type in openapi generator for Android Kotlin project
I am writing an Android application in Kotlin. To generate models, I use the swagger.yaml file provided to me and kotlinx.serialization. Some models in this file contain a field:
delivery_data:
...
0
votes
0
answers
19k
views
DevOps Release: Failed to import from specified resource http://10.XXX.XXX.XXX/swagger/XXX/swagger.json
In a DevOps Release I am getting suddenly this error in "API Management - Create or Update API" step:
2025-06-25T10:48:25.3264215Z Creating or updating API https://management.azure.com/...
0
votes
1
answer
184
views
How can I replace the generated OpenAPI spec in Swagger (JAX-RS + OpenApiResource) with a custom OpenAPI object?
I'm using Swagger with Jersey (JAX-RS) to serve API documentation. I configure Swagger like this:
ResourceConfig swaggerResourceConfig = new ResourceConfig()
.packages("io.swagger.v3.jaxrs2....