Questions tagged [swagger-3.0]

121 questions
2
votes
1 answer

How to explicitly define API Controllers Path for Swagger documentation in Asp.Net Core MVC Project

I am developing a Asp.Net core 3.1 MVC web app with the web API project inside it. Now I want to configure Swagger Documentation for the API project only, So how can I specify in the configurations to use only the web API controllers for…
2
votes
0 answers

Describe pipe delimited encoding in object in response body in Open API 3.0

So maybe I'm trying to go into too much detail in my descriptor, but here's my use case. While defining the schema of the object that is returned in the response body for my API, I have one property of the object the value of which is an object with…
JohnRDOrazio
  • 1,358
  • 2
  • 15
  • 28
2
votes
2 answers

Hide endpoint on swagger 3.0 UI

I want to have one private endpoint, which should be hidden on Swagger API UI. referring to some other posts I created Filter class as below. public class Myfilter implements SwaggerSpecFilter public class MySwaggerSpecFilter implements…
Bosco
  • 3,835
  • 6
  • 25
  • 33
2
votes
1 answer

I need to add multiple examples for the @Parameter in springdoc-openapi, but this is not generating the given examples

I am trying to add swagger documentation to my project. I need to add multiple examples for the @Parameter in @RequestBody for the Sample.class, The following piece of code is how its mentioned to be written in the docs. @PostMapping("/") …
AshithR
  • 98
  • 1
  • 9
2
votes
1 answer

Mandatory header for all API in openapi 3.0

I am using OpenAPI 3.0 with Spring-boot 5 and therefore have no configuration YAML. I have a header that contains the client Identification ID(This is not an authentication header). I want to make that a mandatory header param. Added below OpenAPI…
Akash
  • 387
  • 1
  • 5
  • 19
2
votes
2 answers

Observing error "Unable to infer base url" with springfox-swagger2 version 3.0.0-SNAPSHOT

I'm using spring-boot 2.1.6.RELEASE along with springfox-swagger2 version 3.0.0-SNAPSHOT. But unable to launch swagger-ui (i.e http://localhost:808/swagger-ui.html) or api-docs (i.e http://localhost:8080/v2/api-docs) urls. The same configuration…
cmodha
  • 105
  • 9
2
votes
0 answers

Mixed content error - When served over HTTPS, swagger-ui should prefer HTTPS API protocol

When going to swagger ui link I see errors in console> Mixed Content: The page at 'https://***url***/api/documentation/ui' was loaded over HTTPS, but requested an insecure favicon…
teinekord
  • 66
  • 1
  • 6
1
vote
0 answers

Is there any option to generate only request and response schema when using springdoc-openapi-ui?

I'm using springdoc-openapi-ui at springboot project. When i run the project and see the api-docs.json of swagger. There are all of dto schemas in my project. i'll using this openapi spec file for generating client code. Is there any option of…
1
vote
0 answers

Generating MultivaluedMap parameter definition using annotations with swagger-gradle-plugin (OAS3)

We had next code generated by previous plugin with version OAS2: { "description" : "parameters", "in" : "body", "name" : "body", "required" : false, "schema" : { "type" : "object", …
1
vote
1 answer

Regular Expression for Swagger3 in java. Allowed string with comma separated value

I was trying to write regular expression for string variable in swagger3(OAS). The string can have multiple comma separated string. Each string's length can be between 5 and 15 and each character in a string can be either a-z or A-Z or 0-9. I tried…
Abdullah Imran
  • 259
  • 3
  • 13
1
vote
0 answers

How to do pattern check for an attribute in swagger V3 using spring webflux

I am writing a reactive application using webflux with springdoc-openapi(v 1.4.3). Below is the router class @Configuration public class FacilitiesRouter { @RouterOperation(path = "/facilities", produces = { …
1
vote
1 answer

how to use an External Value (type JSON) in SwaggerUI and NodeJS

openapi: "3.0.0" Swagger-jsdoc: "^6.2.5", Swagger-ui-express: "^4.3.0", Node: v18.8.0 I have a payload with a field called raw_data who is super long. So I decided to use an external value and call it in swaggerUI  I'm using this…
Momo
  • 67
  • 7
1
vote
1 answer

Swagger 3.0 - cannot add parameters to query parameter

I have node express application and am using swagger-jsdoc & swagger-ui-express Inside router I place this code: /** * @swagger * /get: * get: * tags: [ /api/roba/get ] * summary: Vraca informacije o robi po datom id-u * …
Aleksa Ristic
  • 2,394
  • 3
  • 23
  • 54
1
vote
0 answers

How to generate Swagger v3 documentation in JSON or YAML?

I'm using the Swagger v3 annotations to document my controller routes, e.g.: @OpenAPIDefinition(info = @Info(title = "swagger-spring", description = "testing swagger in a spring environment", version = "0.1", …
Thilo Schwarz
  • 640
  • 5
  • 24
1
vote
0 answers

Use envars on swagger for dynamic configuration

this may be trivial question, but I am having problems understanding server variables and how to modify them on swagger. My objective is to create a server using the specs below (5G 3gpp definitions for of its…
Ob200
  • 11
  • 2