Skip to main content

Questions tagged [swagger-ui]

Swagger UI is a collection of HTML, CSS and JavaScript objects that dynamically generate documentation from a Swagger-compliant API

swagger-ui
Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Showing nothing in api-docs while creating Swagger API documentation

The problem is that api-docs is being generated when I don't add .type() and .outType() but the format of the post request is not there. After adding them just like in the below statement api-docs is ...
Sandesh Singh's user avatar
0 votes
1 answer
20 views

OpenAPI - Could not resolve reference: Failed to fetch - from json

Swagger Editor throws an error, after searching similar issues, read documentation, googling... i cant get correct result, can you help me please? Thanks Resolver error at paths./create.post....
Peter's user avatar
  • 31
0 votes
0 answers
15 views

filter swagger documentation according to controller

I want to filter the swagger documentation according to controller name.Is there any swagger endpoint i can access where i can provide the controller name and it will filter the documentation to only ...
Sk2002's user avatar
  • 1
0 votes
1 answer
46 views

How to configure Newtonsoft JSON.NET serializer settings for Swagger example classes?

I am using Newtonsoft JSON.NET for object serialization in an ASP.NET Core (.NET 8) project implementing REST APIs and I need to change serialization settings used for Swagger examples from ...
Alek Davis's user avatar
  • 10.7k
1 vote
1 answer
40 views

Swagger API : should not accept Null

I have added the following to the swagger definition for the api. value : BooleanEnum = Query ( False, alias="value") class BooleanEnum(str, Enum): true = "true" false = &...
Tanu's user avatar
  • 1,454
0 votes
0 answers
22 views

Unable to set Global Header in Swagger-UI Spring-Boot

I am configuring Swagger UI for my spring boot application and the swagger is up and running fine. Now I need to setup a global header in swagger for all the APIs, made all the changes as given below ...
Deepu's user avatar
  • 29
0 votes
1 answer
21 views

How to get a token from ASP.NET core client

ASP.NET CORE Client-Side Best Practice to pass to Generate the Token. The API has been configured with a JWT to secure few actions (e.g. PUT). I have enabled the Edit link (in the index.cshtml) that ...
user2835586's user avatar
0 votes
1 answer
31 views

Auth ErrorTypeError: Failed to fetch. Swagger with OAuth2 Security Scheme, Spring Boot App

I have a Rest API made with Spring Boot and is secured by an external service Authorization Server using OAUTH2 and I'm creating the Docs with springdoc-openapi. The issue is that when sending the ...
Durian Sosa's user avatar
1 vote
1 answer
31 views

Why XML File turn into purple code in Swagger? What's Wrong in my code

I'm trying to get an xml request body to display in Swagger UI. However, this is what I get: This is the documentation I want: <doc><members> ..... !--5. UpdCom1 --> <br> ...
Andrew530's user avatar
1 vote
0 answers
15 views

Is there a way to document multipart form data with id ‘com.epages.restdocs-api-spec’ version “0.18.2” library?

I’m currently working on a Spring Boot project and I’m using the com.epages.restdocs-api-spec library version “0.18.2” to generate API documentation. However, I am having trouble documenting endpoints ...
김도연's user avatar
1 vote
1 answer
53 views
+50

Why is Swagger UI not showing my endpoint with a specific name?

I have a mysterious behaviour in Swagger UI When I name an endpoint "IDCard" it is not showing up in Swagger UI (the endpoint IS callable through Postman though!): However, if I name it &...
Powerslave's user avatar
0 votes
0 answers
30 views

Swagger UI not working in prod mode when quarkus.vertx.classpath-resolving is disabled in Quarkus 3.12.0

In prod mode swagger-ui works when classpath resolving is enabled but not when it is disabled. Specifically, this property value stops swagger-ui from working: quarkus.vertx.classpath-resolving=false ...
Emile's user avatar
  • 150
0 votes
1 answer
15 views

Springdoc works with war but cannot start when embedded within an ear (Wildfly31 + JDK17)

I was using spring-core 6.1.5, springdoc-openapi-starter-webmvc-ui 2.5.0. When i packaged my application as war and deploy to Wildfly31 running on JDK17, it was working fine and I am able to access ...
Alvin C's user avatar
0 votes
0 answers
19 views

Display query parameter example in Swagger UI

Here is a simple API spec: https://app.swaggerhub.com/apis/HITESHWALIA_1/simple-api/1.0.0 In Swagger UI, is there any way to display query parameter example? That is, to display GET /hello?name=John
user219820's user avatar
0 votes
1 answer
33 views

spring boot, how to get swagger UI to be under /swagger/ path?

We have a basic spring boot api service which exposes REST endpoints, e.g. https://myservice.com/customer/get and https://myservice.com/country/get We integrated swagger, but the URLs for swagger are ...
John Little's user avatar
  • 11.7k
0 votes
0 answers
18 views

Swagger UI keeps shows Swagger Petstore [duplicate]

I used this dependency to configure my Swagger UI: <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-ui&...
user25450700's user avatar
0 votes
0 answers
39 views

Making Custom Json Converter for strong type Id

I tried to create a custom JSON converter for ProductId, but the conversion didn't apply to Swagger UI. It still sees ProductId as id: { value: }. I want it to see only the GUID value as shown in the ...
Mohamed Atef's user avatar
0 votes
0 answers
25 views

Swagger-ui from springdoc-openapi-starter-webmvc-ui display wrong data, But online swagger editor is correct

My openapi.yaml file showing correct data in editor, but not in my local project, any idea what could be the problem here? Image from my project swagger-ui enter image description here Image from ...
AdanhBurg's user avatar
0 votes
2 answers
32 views

changing the route list depending on the server port (swagger)

I would like to share routes that are already linked via tags via the "selected server". { "openapi": "3.1.0", "info": { "title": "...
Exdet's user avatar
  • 29
0 votes
1 answer
39 views

spring + swagger = /swagger-resources/configuration/ui 404 NOT FOUND

I followed this excellent example to add swagger and its UI to our old spring project: Swagger REST API documentation with Spring Boot It seems to have worked in that when I start the app I can hit ...
John Little's user avatar
  • 11.7k
3 votes
2 answers
65 views

Swagger show decimal as 0.00 instead of 0

I have this class: public class CostDto { public int Id{ get; set; } public decimal? Price { get; set; } } In the swagger it shows this: { "Id": 0, "Price": 0 } ...
J Flex's user avatar
  • 464
0 votes
0 answers
26 views

Django drf-spectacular show permissions for each view

I'd like to show the necessary permissions for each API endpoint in my Swagger UI. I'm not finding any relevant documentation. So something like: @extend_schema( description="Get all ...
AlxVallejo's user avatar
  • 3,157
1 vote
0 answers
30 views

Selenium chrome driver does not load dynamic content?

I have an integration test that checks if the Swagger UI of the application is accessible. I set up my Chrome driver like this: chrome = new BrowserWebDriverContainer<>() ....
texmelex's user avatar
0 votes
0 answers
22 views

Swagger API - Generated Spring Server interprets int64 API parameter as String in Swagger GUI

For creating RestAPI-Specifications, I use https://editor-next.swagger.io as editor. When creating API endpoints and parameters for the endpoints, I set the type of the parameter (e.g. number, string, ...
Dev's user avatar
  • 1
0 votes
0 answers
30 views

Blank swagger-ui page in spring boot webflux

I have a spring boot webflux application and I need to configure swagger-ui for it. I am deploying the application on aws lambda and also have an aws gateway API that I can use to access the swagger-...
Vermilion-exe's user avatar
0 votes
0 answers
55 views

How to disable request example JSON formatting in Swagger

I'm writing an C# .NET 8 application using OpenAPI and Swagger. I've a specific endpoint, where the defined JSON request example needs to have a specific format. In my case it's slimmed in one line ...
dhrm's user avatar
  • 14.8k
0 votes
1 answer
50 views

How to remove "swagger-ui" from Swagger URL?

I have below URL working in my Spring Boot project. http://localhost:8080/swagger-ui/index.html I would like to shorten it to something like http://localhost:8080/docs/index.html I have tried adding ...
drocky's user avatar
  • 5
0 votes
0 answers
22 views

SwaggerUI authorize openapi.json with X-API-Key

I have swagger-ui running in a Docker container. I am trying to fetch my openapi.json API definition file which is protected by an X-API-Key. How can I tell swagger-ui to capture and use an X-API-Key ...
muncherelli's user avatar
  • 2,893
0 votes
1 answer
28 views

Disable specific authentification flows in Swagger UI

I am developing a quarkus application that uses a keycloak as oidc provider which works fine. I also set up an swagger-ui page in which one can authenticate to use endpoints that require authorization....
JaB's user avatar
  • 444
0 votes
1 answer
66 views

How to add CORS header to response for Swagger UI

I'm getting unable to fetch message in Swagger UI when I'm calling the below AWS API gateway URL via Swagger UI docs locally. The CORS has been enabled on the server, however it's only erroring out on ...
Alex Smith's user avatar
-2 votes
0 answers
43 views

How to config font-size, placeholder,... in swagger for flagger (lib of python)

My swagger (very bad: font-size is too big, place holder): enter image description here Example swagger: enter image description here how to config in flagger My config: from flasgger import Swagger ...
Nam Kiều Thanh's user avatar
0 votes
1 answer
98 views

Spring boot actuator mapping: add description of endpoints | Spring Boot 3.3.0

I'm using spring doc open api in my spring boot project. In my rest controller I have 2 endpoints that are identical and only differ in params and the content of requestbody. Example: @PostMapping(...
Nick M.'s user avatar
0 votes
0 answers
30 views

quarkus reasteasy configure default set of responses

When using resteasy to generate a swagger-ui by default i got a documented a 200 with my schema a 401 and 403, since i want to add for all my endpoints a 400, 404 and a 500 with an error schema I am ...
Vlad Drakul's user avatar
0 votes
1 answer
30 views

How do I define an array of strings including the array itself in OpenAPI parameters?

Assume we have definition: parameters: - name: "myParameter" in: query description: array of items required: true allowEmptyValue: false schema: type: array ...
fewfew's user avatar
  • 291
2 votes
1 answer
76 views

get_swagger_ui_html causing unwanted Server options to display in FastAPI application

I need to change the styling and add extra HTML to the default generated docs in my FastAPI application, so I use get_swagger_ui_html to achieve this. This causes the operation level options for '...
Adam's user avatar
  • 23
0 votes
2 answers
59 views

swagger 3 import not found after spring 3 update

There has been post similar to my issue but I have all the correct dependentcies. I also have another application that is working with swagger 3 that I just updated to spring 2 -> 3. I am ...
Mike3355's user avatar
  • 11.8k
0 votes
2 answers
80 views

spring boot 2.5.6 without spring security and security config upgraded to spring boot 3 making swagger not working

When trying to upgrade my spring boot project from 2.5.6 to 3.2.5 swagger UI stops working. In version 2.5.6, I do not have spring security nor security config. I have only SwaggerConfig : @...
arysse's user avatar
  • 3
0 votes
0 answers
13 views

Swashbuckle.AspNetCore ProblemDetails can't be generated as Swagger Schema

Does someone know what I do wrong? Or if this is really a bug by Swashbuckle. https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/2944 BR, Sandro
S.Schindi's user avatar
0 votes
0 answers
30 views

Swagger UI unable to be configured

I am trying to configure Swagger UI to my Springboot Project. But It is not working for some reason. First, I added all the dependencies. Here is the build.gradle file: plugins { id 'java' id '...
user25450700's user avatar
0 votes
1 answer
97 views

Swagger Fails to Load

I'm Using Azure Functions (Isolated) and trying to navigate to Swagger UI and getting the following error: Failed to load API definition. Fetch error undefined https://localhost:7009/api/v1/swagger....
Mike's user avatar
  • 798
1 vote
1 answer
83 views

Fastendpoints swagger summary not displaying

Extract of my program.cs : ... .AddSwaggerGen(opt => { opt.SwaggerDoc("v1", new OpenApiInfo { Title = "thing.Forum.Api", Version = "v1" }); opt....
WynDiesel's user avatar
  • 1,154
1 vote
1 answer
56 views

Swagger UI Not Displaying Routes in Fastify with Dynamic Mode

Fastify Swagger isn't displaying any of my routes in the Swagger UI, even though the routes are working fine when accessed directly. I'm using Fastify with the @fastify/swagger plugin in dynamic mode, ...
aCodeOrNot's user avatar
0 votes
0 answers
28 views

How to add @SecurityRequirement(name = "X-API-KEY") from microservice swagger in Central Swagger in spring cloud Gateway

I have an issue when I add authorizations from spring gateway like this: When I hit the swagger API, the API key is not sent to the API, and get error like this: The log in microservice does not ...
Ilham Harazky's user avatar
0 votes
0 answers
26 views

File Upload in Swagger

I have an endpoint in swagger UI where I upload a .txt file and looks like this: [HttpPost("UploadBlackList")] public IActionResult UploadBlackList(IFormFile formFile) { try { Task....
Catalin Briscan's user avatar
2 votes
1 answer
110 views

ASP.NET Core Web API : CORS error while try to authorize user from Azure AD

I am trying setup an application which is an open source built on .NET Core, below is the path for the application source code from where I have downloaded it. https://gitlab.com/sis-cc/.stat-suite/...
Sayan's user avatar
  • 29
0 votes
1 answer
155 views

Swagger UI not working in Spring Boot Project

I was following a Java project tutorial by Telusko and did things exactly the way he had done. However, my code doesn't take me to the Swagger when I visit http://localhost:8080/swagger-ui.html. I ...
prashantjerk's user avatar
0 votes
1 answer
29 views

Swagger UI stopped working after ContentSecurity policy configuration in sprint-boot version 2.7.3

After we added Swagger security configuration with jwt token, the swagger is not accessible. The error in the console is: Refused to execute inline script because it violates the following Content ...
Sharvari Nagesh's user avatar
0 votes
1 answer
41 views

Missing StringUtils.containsAny() when i am added the swagger

I am trying to add the swagger in my project and getting this error 2024-06-03T16:01:55.361+05:30 INFO 38783 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring ...
Ùtkårsh Thãkûr's user avatar
0 votes
0 answers
86 views

Swagger OpenApi Authorization code flow with auth0 and spring security

I'm having issues with configuring openapi (swagger) to use authorizationCode flow with auth0 as security provider. On auth0 side I've configured API and application (Machine2machine type) Below is ...
Danil Tk's user avatar
0 votes
0 answers
79 views

OpenApi with generic Pagination Model

I have implemented a pagination in Spring boot and i want to document it. I have created a generic pojo with this structure: @Getter @Setter @Builder @AllArgsConstructor @NoArgsConstructor @...
psilos's user avatar
  • 101

1
2 3 4 5
92