4,793 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
53
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
54
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
69
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
77
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
85
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. ...
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 ...
-4
votes
0
answers
72
views
Not able to start OpenAPI built-files
I'm currently building a simple AI Categorization using monorepo. You can check out my github repo https://github.com/galih56/issue-classifier-ai-agent/tree/dev-testing.
My issue is i can run my API ...
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 ...
1
vote
1
answer
215
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
76
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
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-...
3
votes
0
answers
802
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
228
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
26
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
37
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/...