12,424 questions
0
votes
1
answer
28
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
0
answers
35
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-...
1
vote
0
answers
46
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 }, ...
1
vote
1
answer
47
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
votes
1
answer
43
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-...
61
votes
19
answers
191k
views
How to run Swagger 3 on Spring Boot 3
Using a fresh Spring Initialzr with Java17 and Spring Boot 3.0.0, and an extra addition to the pom.xml for Springfox Swagger 3, I can't for the life of me get Swagger pages to work. Instead, I get the ...
1
vote
1
answer
197
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 ...
0
votes
0
answers
21
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(&...
9
votes
6
answers
16k
views
How to use both @RestControllerAdvice and Swagger UI in Spring boot
I have a very simple Spring boot project contains Swagger UI:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</...
310
votes
16
answers
232k
views
How to omit methods from Swagger documentation on WebAPI using Swashbuckle
I have a C# ASP.NET WebAPI application with API documentation being automatically generated using Swashbuckle. I want to be able to omit certain methods from the documentation but I can't seem to ...
1
vote
1
answer
105
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 ...
120
votes
39
answers
227k
views
ASP.NET Core - Swashbuckle not creating swagger.json file
I am having trouble getting the Swashbuckle.AspNetCore (1.0.0) package to generate any output. I read the swagger.json file should be written to '~/swagger/docs/v1'. However, I am not getting any ...
0
votes
0
answers
42
views
Error on invocation of reitit.swagger/create-swagger-handler
I am trying to make a sample web application on clojure that uses reitit and exposes its structure via swagger. To that end i have added code that handles request for "/swagger.json" as ...
2
votes
2
answers
6k
views
While accessing swagger API, I get java.lang.NoSuchMethodError: 'void org.springframework.web.method.ControllerAdviceBean.<init>(java.lang.Object)'
I'm using Spring Boot 3.4.5 with springdoc-openapi-starter-webmvc-ui:2.3.0 to integrate Swagger UI in my Spring Boot REST application. This is my security configuration:
@Bean
SecurityFilterChain ...
0
votes
0
answers
56
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 ...
103
votes
25
answers
171k
views
How to configure Swashbuckle to ignore property on model
I'm using Swashbuckle to generate swagger documentation\UI for a webapi2 project. Our models are shared with some legacy interfaces so there are a couple of properties I want to ignore on the models. ...
2
votes
3
answers
2k
views
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 ...
167
votes
17
answers
368k
views
How to send custom headers with requests in Swagger UI?
I have some endpoints in the API - /user/login, /products.
In Swagger UI I post email and password to /user/login and as a response I receive a token string.
Then, I can copy the token from the ...
1
vote
0
answers
71
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
220
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 ...
58
votes
4
answers
29k
views
Lockdown failed: TypeError: At intrinsics.Object.groupBy expected boolean not function
lockdown-run.js:17 Lockdown failed:
TypeError: At intrinsics.Object.groupBy expected boolean not function
lockdown-more.js:99 Protecting intrinsics failed:
ReferenceError: harden is not defined
(...
178
votes
6
answers
393k
views
What is the correct way to declare a date in an OpenAPI / Swagger-file?
What is the correct way to declare a date in a swagger-file object? I would think it is:
startDate:
type: string
description: Start date
example: "2017-01-01"
format: date
...
140
votes
16
answers
309k
views
How to configure Spring Security to allow Swagger URL to be accessed without authentication
My project has Spring Security.
Main issue: Not able to access swagger URL at http://localhost:8080/api/v2/api-docs. It says Missing or invalid Authorization header.
Screenshot of the browser window
...
1
vote
1
answer
279
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 ...
2
votes
3
answers
5k
views
FastAPI error when handling file together with form-data defined in a Pydantic model
Here is the Pydantic model used for defining Form data:
from typing import Annotated
from pydantic import BaseModel, StringConstraints, EmailStr
class RouteBody(BaseModel):
email: Annotated[...