Questions tagged [swagger-jsdocs]

24 questions
5
votes
1 answer

Swagger openapi 3.0.x empty body

I am trying to migrate my from swagger 2.0 to openapi 3.0.2 for my express api. The swagger definitions and paths are written in swagger-jsdoc. This should cause no problems because their documentation state that it can work with openapi 3.x as well…
ARR
  • 2,074
  • 1
  • 19
  • 28
3
votes
2 answers

Swagger - No data sent in body (swagger-jsdocs, swagger-ui-express)

for an nodejs-project I am using swagger-ui-express and swagger-jsdocs for the Swagger API. When I try to call an POST-Endpoint of my application with Swagger then there is no data sent with. What could be the problem? My whole relevant code is…
Buzz
  • 315
  • 6
  • 18
3
votes
1 answer

Swagger JSDoc does not loading API files from sub folders

I am integrating swagger doc for a project in node.js and express framework, NPM: Swagger JSDoc - ^4.0.0 NPM Below is folder structure: (Note: module-1, module-2 and module-3 are folders!) - app - module-1 - module-1.controller.js …
turivishal
  • 34,368
  • 7
  • 36
  • 59
2
votes
1 answer

@openapi is not working/recognized in typescript project

I have defined the swagger.ts as below: import swaggerJSDoc from "swagger-jsdoc"; import { version } from '../package.json'; const options: swaggerJSDoc.Options = { definition: { openapi: "3.0.0", info: { title: "abc…
2
votes
1 answer

How to write a nested object in Swagger 3.0 for components

So I am working on developing the components yaml file in the Data Transfer Object files so I can then reference them. This is what I have so far: /** * @openapi * components: * schemas: * VerifiedEmailAddressDto: * type: object * …
Daniel
  • 14,004
  • 16
  • 96
  • 156
2
votes
1 answer

Swagger-JSdoc is not working on Node.JS 14.15.4 error 'ERR_REQUIRE_ESM'

this is not duplicate i have already did researched and checked other stack overflow links such as this, this and this I imported swagger in existing Node.JS app like this var swaggerJsdoc = require("swagger-jsdoc"), var swaggerUi =…
Zain Ul Abidin
  • 2,467
  • 1
  • 17
  • 29
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

Swagger-ui-express swagger-JsDoc error Could not render n, see the console. in NodeJS app

I have a NodeJs app using swagger-ui-express swaggerJsDoc. When expand schemas as swagger define encountered error below. What should I do ? Error server.js swagger
1
vote
1 answer

Why swagger not direct to the url i specified in yaml file?

I am trying to create a swagger API documentation in express and node . This is my part of code i have done . index.js file const express = require('express'); const swaggerJSDoc = require('swagger-jsdoc'); const swaggerUi =…
lekshmi
  • 338
  • 3
  • 9
1
vote
1 answer

Not generating swagger document - Node JS + swaggerJSDoc

I am trying to crate swagger documentation for my Node JS express APIs. Added following code in app.js: const options = { definition: { openapi: '3.0.0', // Specification (optional, defaults to swagger: '2.0') info: { title: 'Hello…
1
vote
1 answer

existing nodeJS and swagger JS docs not working

I have a simple nodeJS project and want to add swagger into it. I have required swaggerUI and swaggerJSDoc Here is my app.js file. // requires const path = require("path"); const express = require("express"); const bodyParser =…
PeteBaser
  • 263
  • 1
  • 5
  • 15
1
vote
1 answer

Syntax error on swagger-jsdoc setup in nodejs

I am getting a syntax error on trying to set up swagger with my express app I was trying to follow this tutorial here https://itnext.io/setting-up-swagger-in-a-node-js-application-d3c4d7aa56d4 as a quick start guide, I do not know why I am getting…
1
vote
2 answers

Swagger Bearer Authorization not usable in ui

I am using openApi 3.0 specification, koa2-swagger-ui, and swagger-jsdoc. I am trying to get the Authorize button on the swagger ui to allow me to enter a JWT token so my requests will be authorized. I followed the OpenApi 3.0 documentation for…
Luke Reagan
  • 61
  • 1
  • 6
0
votes
0 answers

How to add Reusable Headers for swagger documentation using swaggerjsdoc and swaggeruiexpress

Reusable Headers for swagger documentation using swaggerjsdoc. Hi, I need to document my apis written in node js and I am using swaggerjsdoc and swagger express ui. I have about 11 different headers like deviceID, location etc and they will be used…
0
votes
0 answers

swagger-jsdoc not running in a docker container

I am getting an error when running swagger-jsdoc, swagger-ui-express in a docker container. at GlobSync._process (/app/node_modules/swagger-jsdoc/node_modules/glob/sync.js:130:10) { errno: -1, syscall: 'scandir', code: 'EPERM', path:…
cam
  • 231
  • 2
  • 6
1
2