Hi there,
I'm using swaggerJsDoc and swagger-ui-express mainly because I found some tutorials on how to use them.
No errors are coming up in the Swagger UI or in the console. The response is coming back "200" and I can see the correct response.
This is one example of the schemes I've created:
/**
* @swagger
* components:
* schemas:
* abc:
* type: object
* required:
* - vQty
* - scope
* - growth
* - usePerV
* properties:
* vQty:
* type: integer
* description: VQuantity
* scope:
* type: integer
* description: Years in scope
* growth:
* type: number
* format: float
* description: Growth per-year
* usePerV:
* type: boolean
* description: Use Per-V files
* example:
* vQty: 200
* scope: 3
* growth: 0.2
* usePerV: true
* abcResponse:
* type: object
* properties:
* abcServer:
* type: object
* properties:
* jobs:
* type: number
* format: float
* description: Job quantity
* buCores:
* type: number
* format: float
* description: BServer C
* buRam:
* type: number
* format: float
* description: BServer R
* dbServer:
* type: object
* properties:
* sCores:
* type: number
* format: float
* description: SServer C
* sRam:
* type: number
* format: float
* description: SServer R
*/
And the paths
/**
* @swagger
* paths:
* /vServer:
* post:
* summary: Returns the VBR and SQL calculation
* tags: [abc]
* requestBody:
* required: true
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/abc'
* responses:
* "200":
* description: OK
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/abcResponse'
*/
Any help would be appreciated.
Ed