12,484 questions
1
vote
1
answer
41
views
Swagger Editor shows multiple "Structural error at [path] should have required property 'description' missingProperty: description"
So I have a bunch of these errors in the title when I try to put my generated openapi.json in the Swagger Editor. Since I don't want to write any description where the description is required and ...
0
votes
0
answers
39
views
Nest.js. Swagger. How to split swagger docs into 2 documents: for clients and admins
I'm using NestJS (v11) and @nestjs/swagger (v11.0.3).
I have a modular app structure where some controllers are intended for public clients (mobile app, frontend) and others are intended for admin ...
0
votes
1
answer
29
views
ASP.NET Core Web API - Unable to launch swagger on browser because of OpenApi issue
When I launched my ASP.NET Core 8.0 Web API application on the browser, I got this error:
Unable to render this definition The provided definition does not specify a valid version field. Please ...
2
votes
0
answers
71
views
Override parent class swagger annotations
This is my parent class:
public abstract class Measurement {
@Schema(description = "The value", example = "1")
public Double amount;
@Schema(description ...
-1
votes
0
answers
18
views
Is there an router attribute which is the opposite of @Hidden?
Currently Im using @Hidden attribute on each controller function (which kind of blackList) and I want to use whiteList and to pick only the ones that need to be exposed in swagger and not the one that ...
0
votes
0
answers
22
views
Flasgger displaying Swagger page locally, but fails to load API definition on Azure
When I run this locally, the swagger page loads as normal, with all my endpoints and tests effectively. However, when I send it to Azure, I get the following page:
Failed to load API Definition.
When ...
1
vote
1
answer
54
views
How to hide api routes generated by swagger?
I really couldn't figure this one out on my own and I didn't find any answer on the internet neither so I'll try it here.
Swagger is showing me lots of controllers that I have not created and I have ...
0
votes
1
answer
77
views
How to fix WhiteLabel Error Page in SpringBoot 3.4.4
So I'm making a test calendar project and this are the dependencies of my pom.xml file.
Springboot would throw the WhiteLabel Error Page 404 at me even thougth I followed the SpringDoc documentation.
...
1
vote
1
answer
31
views
OpenAPI subset of a property with a $ref
I'm building out a schema A which has a property that references another schema B. The problem I'm having is I only need a subset of a enum property in schema B. Is there a way to do this within the ...
0
votes
0
answers
29
views
Why is Swagger UI not handling optional files properly?
I have a minimal example in this script:
from fastapi import FastAPI, File, Form, UploadFile
from typing import Optional
from fastapi.responses import JSONResponse
app = FastAPI()
@app.post("/...
0
votes
0
answers
32
views
Api platform Swagger "Call to a member function withParameters() on null"
Apiplatform 4.0.17
Symfony 7.0
I have a symfony project with apiplatform and lexi/jwt token. Now I implemented SymfonyCasts/reset-password-bundle. This works fine on the API. But the swagger from ...
-1
votes
0
answers
16
views
How to Integrate swagger in an old restify application
I have an old project which is in
"restify": "^11.1.0",
"node":">=14.0.0"
I have tried the library for docs
"swagger-jsdoc": "^6.2.8",
...
0
votes
0
answers
28
views
Best way to generate parent schema specification using Swagger Gradle Plugin
Swagger Gradle Plugin generates a JSON OpenAPI specification from a Jakarta Web application specification.
plugins {
id 'java'
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.30'
}
...
0
votes
0
answers
43
views
How to Have Swagger to support multiple API version
Good day.
I am new to API and using Microsoft Visual Studio 2022, .NET Core 9 as the development platform. I wish to have the swagger to support multiple AI version but not success.
Below is my code ...
0
votes
0
answers
34
views
Jackson Deserialization Error for Enum with @SerializedName in Swagger Generated Class
I am encountering an issue with Jackson deserialization when trying to convert a JSON response into an enum class generated by Swagger. The error message I receive is:
com.fasterxml.jackson.databind....
0
votes
1
answer
47
views
How to include path in server url element of OpenAPI spec generated from ASP.NET Core Minimal API application?
I have a C# / ASP.NET Core Minimal API app with Swagger generating an OpenAPI spec. In order to match the publish yml, I need to add a server with path and remove the path elements from individual ...
0
votes
0
answers
32
views
Golang Fiber Swagger cant find model :cannot find type definition: models.SignUpParams
I am trying to use gofiber swagger. When I run swag init I get the following error message.
2025/03/31 12:11:39 Generate swagger docs....
2025/03/31 12:11:39 Generate general API Info, search dir:./
...
0
votes
1
answer
20
views
All operations must include the 'Authorization' header in the request parameters, except for the '/health' endpoint
I am trying to create a custom rule in swagger to validate all API endpoints must include a Authorization' and 'key' header present except '/health' endpoint.
{
"rules": {
"...
0
votes
0
answers
27
views
Alternative to Swagger's IncludeXMLComments in native MS OpenApi on .NET9
Is there an alternative to Swagger's configuration IncludeXMLComments in native MS OpenApi which is introduced on .NET9? I'm running a project on .net8 and migrating to .net9 and wanted to migrate to ...
0
votes
1
answer
48
views
Ocelot API Gateway in .NET 8 not showing downstream services in Swagger UI
I'm implementing an Ocelot API Gateway in .NET 8 with Swagger integration, but my downstream services aren't appearing in the Swagger UI. Here's my setup:
Service 1 is running on port 5001, and it ...
0
votes
1
answer
49
views
Error publishing ASP.NET Core 6 Web API to Azure App service
I am new to ASP.NET Core and I am working through a book. I am now trying to publish my sample API to Azure App Service (Windows), and I am getting this exception:
Publish has encountered an error.
...
0
votes
1
answer
24
views
C# Swagger UI common route parameter
Is it possible to define a common route parameter that can be set at the top of document, and if used it is injected in all the required routes?
We have a set of routes that all share a common route ...
0
votes
0
answers
59
views
How to Display Zod Validation Errors in Swagger with zod-openapi?
I've made an error handler middleware in Express. The problem is that the error is not being thrown in the openapi/swagger. How to fix it? Also why am I getting an error if my request body is ...
2
votes
1
answer
90
views
How to display both application/json and application/octet-stream content types in Swagger UI autodocs in FastAPI?
I have an endpoint that can return JSON or a file (xlsx):
class ReportItemSerializer(BaseModel):
id: int
werks: Annotated[WerkSerializerWithNetwork, Field(validation_alias="werk")]
...
3
votes
1
answer
84
views
Swaggo not parsing example values from struct tags in Go API documentation
I'm using Swaggo to document my Go API endpoints. I have a handler function where I've defined a struct with example tags in the JSON struct fields, but these examples aren't appearing in the ...
0
votes
0
answers
27
views
SwaggerResponse add "Field" suffix to property name
I have an issue with Swagger model preview. I using ASP.NET Web API.
It shows me this model:
But all model properties - is a private property names.
So, on my opinion there must be Id instead of ...
0
votes
1
answer
35
views
OpenAPI parameters with inheritence
I'm trying to modernize a .NET Framework WCF application into a .NET 9 OpenAPI application.
I have created an ASP.NET Core Web API project with default settings, targeting .NET 9.
This is what my ...
8
votes
3
answers
801
views
Unable to render this definition after updating Swagger from 7.2 to 8.0.0
I have updated Swashbuckle.AspNetCore nuget package from 7.2.0 to 8.0.0 in my web api project. After updating I am getting an error in the swagger UI like this,
It was working fine for 7.2.0. My ...
0
votes
1
answer
123
views
I encountered a Swagger error when using from __future__ import annotations with Pydantic, FastAPI, and SlowAPI in my project
I encountered the following error while working with FastAPI and Pydantic and SlowApi:
pydantic.errors.PydanticUserError: `TypeAdapter[typing.Annotated[ForwardRef('ResponseModel'), FieldInfo(...
0
votes
0
answers
27
views
Typescript enum generated from OpenApi 3.0 : enum names don't match the definition for some cases [duplicate]
I am trying to define an enum in openApi 3.0 that is shared between a typescript front end and a java back end. For legacy reasons that probably can't be changed, not all the enum names match up with ...
0
votes
0
answers
37
views
How to send request to API that uses MessagePack with MagicOnion using Postman
I have an API that is using MagicOnion and MessagePack in .NET. I am using swagger like this:
public static IServiceCollection AddMagicOnionServices(this IServiceCollection services)
{
services....
0
votes
1
answer
133
views
spring boot swagger exampleObject static resource externalValue base path
I'm using org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.3 to add swagger documentation to my project. I wanted to add an example json response but this is a big json file so I'm just getting ...
1
vote
0
answers
54
views
Unwanted "result" Value in @RequestMapping `produces` Attribute Generated by OpenAPI Generator
I'm using the OpenAPI Generator plugin for server stub generation based on a Swagger 2.0 specification. I’ve encountered an issue where the generated code contains an unwanted "result" value ...
0
votes
0
answers
30
views
JHipster API Gateway - Microservices Endpoints Missing in Swagger Spring Boot 3.3.5
JHipster API Gateway - Microservices Endpoints Missing in Swagger After Spring Boot 3.3.5 Upgrade
I have a JHipster API Gateway where Swagger (http://localhost:8080/admin/api-docs) does not display ...
1
vote
1
answer
21
views
Unable to log in local instance of Swagger-UI (Docker)
How does one actually log in and start using swagger UI at all? The moment I launch it (via docker), I got shown the log-in page which is essentially not self-explanatory. Tried signing up with a new ...
0
votes
1
answer
38
views
.NET Core swagger.json - replace default swagger.json with a custom one
builder.Services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
c.SwaggerDoc("v2", new OpenApiInfo { ...
0
votes
1
answer
73
views
ASP.NET Core Launch Profiles with Multiple Sites and Environment Variables
So I'm new to ASP.NET Core and I'm trying to configure environment variables in Visual Studio for the site we're developing. Right now I've got a Development launch profile, which I want to use with ...
0
votes
1
answer
33
views
How to import text from yml file into Swagger Annotations
I'm using @RequestBody anotation from swagger to add description.
The below anotation doesnot print text from yml:
@io.swagger.v3.oas.annotations.parameters.RequestBody(description = **"${project-...
0
votes
0
answers
20
views
What is the correct way to create api examples in NelmioApiDocBundle?
If you need to provide several options for incoming or outgoing data, how do you specify `examples'?
You can manually specify fields and their values, but
if I have a DTO model, shouldn't I make a ...
0
votes
1
answer
65
views
Endpoint with 'Content-type: application/x-www-form-urlencoded' returns 415 Unsupported Media Type although defined in api.yml
I am using SptringBoot 3.3.4
I am building and enpoint with OpenAPI (Swagger) io.swagger.core.v3 and openapi generator 7.9.0. Here is the definition in api.yaml:
paths:
/verify:
post:
tags:...
0
votes
0
answers
62
views
How can I make the /swagger-ui.html to work behind ingress?
My application is deployed into the EKS.
Here comes my helm values.
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$1
hosts:
- host: ...
1
vote
0
answers
70
views
How to generate only TypeScript types without API controllers/resources from Swagger JSON?
I'm trying to generate only TypeScript types from my Swagger JSON specification using @openapitools/openapi-generator-cli, but it keeps generating API controllers and resources even though I've ...
0
votes
0
answers
19
views
PointerToNowhere Exception when validating CRDs using OpenAPI Schema Validator
I have tried creating a schema and validating yaml file structures based on their datatype and I have been constantly getting the same error no matter how I try to resolve it.
The source code where I'...
-1
votes
1
answer
43
views
Swagger : No operations defined in spec!, Express Typescript on Vercel
I'm using Swagger, and everything was working perfectly on my localhost. However, after deploying my project to Vercel, Swagger no longer works at all. I encountered the following error:
Blank Page
...
0
votes
0
answers
100
views
Generate TypeScript types using OpenAPI Generator only for specific API endpoints
I'm trying to generate TypeScript types using @openapitools/openapi-generator-cli for my React admin panel, but I want to generate types only for endpoints that start with /api/admin. Currently, it's ...
1
vote
1
answer
52
views
Swagger Endpoint UI Causing Fetch 404 Error
I'm create a web api project using .Net8.0. Also, a simple swagger ui is applied for all my endpoints. Endpoints also uses bearer token. I'm also using Swashbuckle.AspNetCore 6.6.0.
It's is working on ...
0
votes
0
answers
18
views
Point Springdoc Swagger-UI to customized YML
Having moved to springdoc openapi, the generated UI was very much different and not as comfortable. I'm currently working with a base.yml that creates several tags without their operations. Base.yml ...
0
votes
1
answer
238
views
Error with Swagger/OpenAPI version field when using Spring Security and Springdoc
I'm facing an issue with my Spring Security and Springdoc OpenAPI configuration. When I configure anyRequest().authenticated(), I receive the following error message:
Unable to render this definition
...
0
votes
1
answer
46
views
Swagger with basepath on the same host as swagger definition
I've read upon the basePath spec of swagger from here. However, it seems that my current scenario is not among the ones listed here.
I need to basically:
Use the same SCHEME and HOST as the location ...
0
votes
1
answer
112
views
Can't get to Swagger in Docker executing ASP.NET Core
I have the image built like this using executing
docker build --tag=api --file=Dockerfile_01 --no-cache --progress=plain .
based on the Dockerfile_01 below.
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS ...