Questions tagged [swagger-3.0]
121 questions
0
votes
1 answer
Swagger send and receive array
openapi: "3.0.0"
info:
title: project
servers:
- url: http://example1.net/v3
- url: http://example/v3
paths:
/Pn/{PnId}/service1:
post:
summary: Pn data
description: |
can Pn the data
requestBody:
…

Maazen
- 107
- 1
- 14
0
votes
1 answer
Open API 3.0 RequestBody not accessible in req.swagger.params as it is coming in undefined in node API
When I am trying to access the requestBody it is giving me error cannot access undefined.
Then I checked by printing the req.swagger.params it looked like this:
{ _id:
{ path: '/v0/users/config/{_id}',
schema: [Object],
…

abhishek
- 73
- 1
- 8
0
votes
0 answers
Turn off the generation of externally referenced models in swagger
Assume I have a yml file example.yml as given below:
ExampleResponse:
type: "object"
properties:
StatusHeader:
$ref: "#/definitions/StatusHeader"
ResponseBody:
$ref: "externaldefs.yaml#/Profile"
Now the model for…

SantaClara
- 86
- 1
- 9
0
votes
1 answer
Issue with creating a documentation when using re-usable enums
The issue with creating documentation when using re-usable enums
My yaml file looks like this
openapi: 3.0.2 components: schemas:
Countries:
type: string
enum:
- Unknown
- Afghanistan
- Albania
-…

Sim
- 49
- 12
0
votes
0 answers
Error while generating NodeJs server code in swagger
While trying to generate nodejs server I am getting the below errors.
Uncaught (in promise) Error: Internal Server Error
at index.js:1
at tryCatch (runtime.js:62)
at Generator.invoke [as _invoke] (runtime.js:296)
at…

Namani Supriya
- 41
- 1
- 14
0
votes
0 answers
How to add a file upload field in Swagger
I'm trying to specify file input in swagger.
ImportUser:
properties:
user_type_id:
description: ID of the related user type
type: integer
format: int32
example: '1'
nullable: false
csv_file:
description:…

pavlek86
- 11
- 1
- 5
0
votes
0 answers
Multiple error codes using the same schema in Swagger UI
I have a schema for a certain status code that i wan to use in multiple responses.
We can have multiple error messages for the same status code and may be distinct on each response.
ErrorCode:
type: object
properties:
…

DanFlorin
- 121
- 1
- 8
0
votes
1 answer
Gets duplicated mapping key error using openapi 3.0
I am trying to define my APIs using openapi version 3.0.0. I've generated following YAML file:
openapi: 3.0.0
info:
title: My YAML
description: My YAML
version: 1.0.0
servers:
- url: http://my.server.url
paths:
/v1/service/uri:
…

Zeinab Abbasimazar
- 9,835
- 23
- 82
- 131
0
votes
0 answers
unable to create swagger definition of generic API response
My server application sends json response in the following format
{
result: ... //this could be success or error
additional-info: ... //this is a wrapper and could contains information depending the the operation
}
additional-info could be a…

Manu Chadha
- 15,555
- 19
- 91
- 184
0
votes
1 answer
Swagger 3.0 reDoc Discriminator JSON
I'm currently writing swagger 3.0 documentation and using reDoc to render as nice UI for it. I have a few scenarios in my documentation where based on a previous properties enum I would want to display different schema object properties. Sadly I…

Tyharo
- 383
- 2
- 5
- 23
-1
votes
1 answer
How can i configure swagger ui 3.0 with spring security 6
How can i configure my swagger-ui with spring security 6. I am upgrading my appication from spring 2.7 to spring 3.12. So there are many changes and i followed the instructions. Here is my code snippet of my webconfig below:
package…

Badmus Sodiq
- 1
- 1
-1
votes
1 answer
How to add Header - Authorization for swagger 3, spring boot
I am using swagger 3, I want to add Authorization with "Bearer token" to call this api. I consulted with chatGpt and was instructed to add "@Parameter(name = "Authorization", description = "Bearer token", required = true, in = ParameterIn.HEADER)"…

NqanVo
- 21
- 2
-1
votes
1 answer
getting error when adding springboot actuator 2.6.6 and swagger 3.0.0
I am facing an error with my spring-boot application after adding the spring-boot actuator.
error saying
failed to start bean documentationPlugginBootstraper, nested exception NullPointer
attached is an image of an error
I am using Gradle as a…

Manoj Madushanka
- 371
- 1
- 7
- 21
-2
votes
1 answer
In Swagger with openapi 3.0, my nested object scheme is not being displayed
I'm working in a nodeJS project with express framework, i am using swagger-jsdoc and swagger-ui-express, also i'm writing my configuration in yaml file. I want to documents my services but i have some problems when i try to display nested objects.…

Paul R.
- 1
- 1