Questions tagged [swagger-node]

8 questions
3
votes
1 answer

How to use swagger-ui-express.serve and setup swagger document inside call back function Nodejs

const swaggerUi = require('swagger-ui-express'); const swaggerDocument = require('./swagger.json'); app.use('/swagger', swaggerUi.serve, swaggerUi.setup(swaggerDocument)); instead of this, i want to use inside callback function of NodeJS Need to…
2
votes
1 answer

Node request entity too large body-parser limit set

I do have a Node backend which serves my react frontend by app.use('/', express.static(`${__dirname}/client`)) The body-parser limits are adjusted by app.use(bodyParser.json({limit: 10 * 1024 * 1024})); app.use(bodyParser.raw({limit: 10 * 1024 *…
Daniel
  • 21
  • 3
1
vote
0 answers

Swagger-node - Capturing multer "Unexpected Field" error

I'm using swagger-node v0.7.5 for a small project that involves uploading a file. The file to be uploaded has been declared in the YAML file and it works as expected, but with the following wrinkle I haven't been able to solve. If the client sends…
1
vote
1 answer

OpenAPI design-first API reference

I am trying to document a REST API reference using the OpenAPI format (v2). I want it to be "design-first", meaning that my swagger spec will be the contract of the API implementation. I have tried many modules and solutions e.g. swagger-node (too…
1
vote
1 answer

swagger-node: using swagger "project edit with" $ref (multiple files)

I'm checking out swagger node. This seems to be something basic so it's hard for me to believe it's a bug. I create the sample swagger hello world project as indicated on the swagger-node git page using swagger project create hello-world. I use a…
Ahmed-Anas
  • 5,471
  • 9
  • 50
  • 72
1
vote
0 answers

cookies header not present in swagger?

0 with express-session but i am not able to send the cookie i.e session.sid in header.its showing in curl but its not showing in server. So can anyone help me how to set it? swagger: '2.0' info: description: This is the list of API pr version:…
0
votes
0 answers

Attaching a debugger to swagger node

I have a node swagger project using: "swagger-node-runner": "0.7.3", I'm using webstorm and I'm trying to attached a debugger to my source code. Controller code, but I cannot. Can someone please help ? I'm tried 30 different things and I can't get…
Dory Zidon
  • 10,497
  • 2
  • 25
  • 39
0
votes
1 answer

How can I set up my swagger-node route to accept any content type?

Currently, I have my Swagger YAML set up to accept application/json by default for each route with the following on the top-level Swagger definition: swagger: "2.0" info: version: "0.0.1" title: my App # during dev, should point to your local…
millerbr
  • 2,951
  • 1
  • 14
  • 25