/** * @swagger * paths: * tags: * - name: Email * /order_email: * post: * tags: * - Emailendpoints * description: this endpoint is used to send email * consumes: * - application/json * parameters: * - name: body * in: body * schema: * type: object * required: * - order_id * - email * properties: * order_info_id: * type: integer * required: true * email: * type: string * required: true * host: * type: string * responses: * 200: * description: User found and logged in successfully * 401: * description: Bad username, not found in db * 403: * description: Username and password don't match */
I'm using swagger jsdoc
Try changing your annotations as follows. Note that "required" is not a property attribute, it's an object-level attribute that contains the list of required properties.
* type: object * required: * - order_info_id * - email * properties: * order_info_id: * type: integer * email: * type: string * host: * type: string
Subject | Author | Latest Post |
---|---|---|