Closed akashvspaceo closed 3 months ago
Is there any possibility to have the fields required in the request body like the image below?
Example code:
export default class AuthController { /** * @login * @requestBody {"email": "", "password": ""} * @responseBody 200 - {"message": "string", "data": { "user": "<User>", "access_token": "string" }} - Successful login * @responseBody 400 - {"message": "string"} - Invalid credentials * @responseBody 422 - {"message": "string"} - Validation error * @responseBody 500 - {"message": "string"} - Internal server error */ async login({ request, response }: HttpContext) { // } }
I can also use @requestFormDataBody {"email":{"type":"string"},"password":{"type":"string"}} but its not allowing to specify the required field.
@requestFormDataBody {"email":{"type":"string"},"password":{"type":"string"}}
Any suggestions?
Is there any possibility to have the fields required in the request body like the image below?
Example code:
I can also use
@requestFormDataBody {"email":{"type":"string"},"password":{"type":"string"}}
but its not allowing to specify the required field.Any suggestions?