4,790 questions
2
votes
1
answer
54
views
.NET 10 OpenAPI generator doesn't generate nullable enums like Swashbuckle
We updated to .NET 10 and we also want to migrate from Swashbuckle to the new integrated OpenAPI generator.
Unfortunately, nullable enum properties (like MyEnum? MyProp or Nullable<MyEnum> ...
-1
votes
0
answers
53
views
main.go code to start for for oapi-codegen generated gorilla mux code [closed]
Hi I am trying to generate go code by using the oapi-codegen toolkit. My openapi spec 3.0.3 is pretty extensive. The generation of the code (with strict http setting) is flawless but it results in a ...
0
votes
0
answers
78
views
Bearer error="invalid_token", error_description="The signature key was not found"
Trying to use OpenAPI and Scalar to add authentication to an ASP.NET Core Web API.
When I call my authorised controller with my bearer token, I get this response message:
Bearer error="...
Advice
1
vote
1
replies
62
views
Microsoft.AspNetCore.OpenApi version 10.0.5 removed Microsoft.OpenApi.Models
I'm in the early stages of writing an new Asp.net core web api based roughly around one I wrote a few years ago. So I read that since .Net 9 Swagger is now been replaced with OpenApi and technologies ...
1
vote
1
answer
105
views
How to configure Swagger UI (version 10.1.7) to send Authorization Header with Bearer Token?
We have recently migrated our .NET project to Swashbuckle.AspNetCore 10.1.7 from version 6.6.2 as part of a larger .NET 8 to .NET 10 migration. However, I'm experiencing serious authorization problems ...
0
votes
0
answers
75
views
Using IOpenApiSchemaTransformer to generate XML example only in specific cases
Somewhat related to this question, ASP.NET Core OpenAPI/SwaggerUI XML root collections "XML example cannot be generated; root element name is undefined"
I'm trying to look at using ...
0
votes
1
answer
131
views
ASP.NET Core OpenAPI/SwaggerUI XML root collections "XML example cannot be generated; root element name is undefined"
I'm trying to use the XmlDataContractSerializerOutputFormatter and XmlDataContractSerializerInputFormatter (yes, I have tried XmlSeralizerOutputFormatter and XmlSerializerInputFormatter so I don't ...
2
votes
0
answers
57
views
Azure APIM managed developer portal "Try It" intermittently shows empty request body with $ref schema (OpenAPI 3.0.1)
We are experiencing an intermittent issue with the Azure API Management managed developer portal where the "Try It" console sometimes fails to preload the request body with example data. The ...
1
vote
0
answers
92
views
ASP.NET Core Web API : OpenAPI/Swagger Ui with custom authorization header
I'm moving a Web API project from .NET framework to .NET 10. While I have the project itself working, I'm trying to get documentation up and running with OpenAPI (Microsoft.AspNetCore.OpenApi 10.0.3) &...
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(
...
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-...
3
votes
0
answers
74
views
How to set params from OpenAPI "requestBody"?
I used to start scanning OpenAPI via Nuclei 3.4.10:
nuclei -l openapi.json -im openapi -c 50 -bulk-size 50 -rate-limit 200 -sresp
While scanning Nuclei is using required_openapi_params.yaml variables ...
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 ...
2
votes
1
answer
184
views
Customizing OpenAPI information when used in an Azure Function
I have an Azure Function, running on .NET 10.0 in isolated worker mode, and I would like to fully integrate OpenAPI and Scalar UI to visualize the service methods the Azure Function provides.
I have ...
0
votes
1
answer
198
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 ...
Advice
0
votes
1
replies
24
views
Azure Foundry Agent OpenAPI connector: Cannot authenticate to Azure DevOps using PAT in OpenAPI spec
I’m trying to connect Azure Foundry Agent (OpenAPI connector) to Azure DevOps REST API.
Locally, the following curl command works and returns a valid JSON list of repositories:
curl -u :<PAT> \
...
1
vote
1
answer
390
views
.NET 10: NSwag generation in csproj during compile time
Up until .NET 9, you could put the Swagger file into your csproj configuration like this:
<OpenApiReference Include="OpenAPIs\swagger.json" CodeGenerator="NSwagCSharp" Namespace=...
-2
votes
1
answer
60
views
I already have dotenv.config() at the top of my server.js file, but still getting this error?
I have tried restarting my computer, running in a different IDE but this error still persists.
Terminal (BASH)
OPENAI_API_KEY: undefined
file:///C:/Projects/chatbot_platform/server/node_modules/...
3
votes
0
answers
103
views
How to load OpenAPI YAML specification from external JAR in Spring Boot 3
I have an openapi.yml file (OpenAPI 3.0 specification) in an external JAR library. How can I configure Springdoc OpenAPI + Swagger UI to display this specification from the external JAR instead of ...
5
votes
1
answer
1k
views
ConventionErrorViewResolver bean conflict with springdoc-openapi-starter-webmvc-ui 3.0.1
I am setting up OpenAPI doc in spring-boot on one of my projects.
Every time I try to run my project with the following dependency:
<dependency>
<groupId>org.springdoc</groupId>
...
1
vote
1
answer
114
views
Can't set up OpenAPI for RestController in Spring Boot
I am trying to set up OpenAPI. My application uses port 9002 and every time I try to access http://localhost:9002/swagger-ui/index.html on the browser the server rejects my request with 403 code.
This ...
2
votes
1
answer
145
views
Add header parameter to endpoint OpenAPI definition
I have an IBindableFromHttpContext<CurrentLanguage> endpoint parameter that I am parsing from language header.
Problem is that it does not show up on OpenAPI/Swagger as a header parameter field.
...
0
votes
1
answer
414
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&...
Advice
0
votes
1
replies
93
views
OpenAPI Generator Maven Plugin: $ref target pointing to schema instead of Response object - SpecValidationException
Problem
I'm using the OpenAPI Generator Maven Plugin (v7.3.0) to generate Java client code from a remote OpenAPI specification. The build fails with validation errors indicating that response $ref ...
0
votes
0
answers
89
views
How to specify a field of default value to be always included individually in yaml definition for a C# OpenAPI service
I have a C# OpenAPI service, which uses dotnet-nswag.dll openapi2cscontroller to generate the Controller code based on a yaml definition.
In Program.cs,
builder.Services.AddNewstonsoftJson(
...
2
votes
0
answers
142
views
Lost OpenAPI descriptions when using recursive Zod schema transformation with zod-to-openapi
I'm using @asteasolutions/zod-to-openapi to generate OpenAPI documentation from Zod schemas. I have a recursive utility function makeSchemaDeepNullable that transforms all fields in a schema to ...
Advice
1
vote
4
replies
98
views
Should I use transformer functions for the data I get from API?
I have a project in Next JS and I am fetching data from API using TanStack Query. I am also using openapi-typescript package for generating API response types automatically from the openapi.json file. ...
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 ...
2
votes
1
answer
123
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 ...
2
votes
1
answer
812
views
OpenApi 3.1 and AddOpenApi in ASP.NET Core application Int32 vs. String
Well, I'm somewhat stuck here and I don't know which side is doing things it's not supposed to do. I'll try to outline the issue first.
I have an API call which is defined like this:
[HttpGet("...
1
vote
1
answer
141
views
Generate Open API spec from Pydantic with references to discriminators
I am trying to create a set of POJOs from an OpenAPI specification that is generated from a pydantic data model. The problem I'm hitting is with discriminators. I am currently using the following ...
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-...
4
votes
0
answers
2k
views
Upgrading project to .NET 10 breaks Scalar support when using document transformers
I'm currently in the process of upgrading to .NET 10 from .NET 9, but unfortunately as usual the documentation of breaking changes seems to be lacking when it comes to certain functionality and ...
Best practices
1
vote
3
replies
572
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"...
Advice
0
votes
0
replies
29
views
Is it possible to generate string fields and const classes from nullable open enums in an OpenAPI spec?
I'm trying to generate a C# client from the OpenRouter OpenAPI spec:
https://github.com/OpenRouterTeam/typescript-sdk/blob/main/.speakeasy/in.openapi.yaml
Among other things there are some enums ...
Tooling
0
votes
0
replies
42
views
Any way to codegen a C# client from an API specification that basically uses dynamic typing?
I was trying to generate a client from the OpenRouter API reference, that can be found in their typescript-sdk github, .speakeasy/in.openapi.yaml :
https://github.com/OpenRouterTeam/typescript-sdk/...
-6
votes
1
answer
114
views
Why does OpenAPI output validation fail for an endpoint but not for others?
I want to create an asynchronuous OpenAPI interface. Async jobs return a 202 and a location header to query later.
This is my OpenAPI document:
---
components:
headers:
JobLocation:
...
0
votes
1
answer
288
views
java.net.URISyntaxException: Illegal character in opaque part at index 2: after upgrading open api from 3.0.3 to 3.1.0
I have spring boot application written in Kotlin lang.
We have REST API contract described in open api file. We use API first approach.
So we use open api generator:
plugins {
...
id("org....
Advice
1
vote
2
replies
50
views
What dependency for Swagger/OpenApi to work in Kotlin and WebFlux Spring Boot application?
I tried a lot of different options, but I cannot find the right dependency that works with Kotlin ans WebFlux simulatneously. Which one should I use? Is it possible to have this setup?
0
votes
1
answer
63
views
OpenApiInteractionValidator does not find any errors in trivial error cases
OpenApiInteractionValidator seems to be ignoring almost all request errors. Seems like I am missing some configuration option or the tool is really extremely limited. I have checked my spec against ...
0
votes
0
answers
269
views
How to correctly configure credentials in OpenAPI generated services
I have an Angular service, generated via @openapitools/openapi-generator-cli. OpenAPI offers possibility to customize its configuration via provideApi method. I want to provide Basic auth in case, ...
0
votes
1
answer
79
views
IDs are mismatched when calling Spring Boot REST API from Next.js client generated using OpenAPI/Swagger
I have a Spring Boot Data REST project with the following classes
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Product {
@Id
private String sku;
@OneToMany(...
0
votes
0
answers
74
views
Unable to retrieve custom properties in customized openAPI generator
I'm developing a custom OpenAPI Generator and would like to execute specific logic based on custom configuration properties defined in the openapi-generator-maven-plugin configuration.
Here’s an ...
1
vote
1
answer
102
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 ...
1
vote
0
answers
106
views
Swashbuckle ISchemaFilter Parameter Description .NET 8.0
I want to add helpful message with CSS style to the Swagger UI schema section of my method. So far I have a message displaying for the object but I want them for each property.
Here is what I am doing ...
3
votes
0
answers
81
views
How to Preserve Both [Required] and Nullable Properties in Swashbuckle Schema Output?
I have a DTO class defined as follows:
public class QuantityDto
{
[Required]
public decimal? Value { get; set; }
[Required]
public string? Unit { get; set; }
}
My goal is to maintain ...
7
votes
4
answers
396
views
Swift OpenAPI Package Generator ClientMiddleware Protocol Never Conforms
When creating a new Authentication Middleware class that conforms to the ClientMiddleware protocol defined in the swift-openapi-runtime library, Xcode reports that the class does not conform to the ...
0
votes
1
answer
249
views
Rendering of JSON formatted OpenAPI 3 doc in API definition using substitution fails in Backstage UI
We are running Backstage v1.37, and are trying to render our OpenAPI definitions by referencing them in the definition field, rather than hard-coding the content into our YAML files that define the ...
0
votes
0
answers
32
views
Graphql Mesh - How to store to DB rather physical location
By using Graphql Mesh I am able to convert soap, rest, rpc into graphql queries/schemas but it is storing everything in yml file and schema files.
If I have 500 sources, saving all sources into yml ...