I can't figure out how to implement a swagger (using a swagger-node-express project) function in node that just returns the response code
For instance for this swagger path:
/api/user/create:
x-swagger-router-controller: api
get:
operationId: userCreate
parameters:
- name: username
in: query
description: The username of the user.
required: true
type: string
- name: password
in: query
description: The password of the user.
required: true
type: string
- name: email
in: query
description: The email of the user.
required: true
type: string
responses:
'200':
description: OK
'412':
description: User already exists
I would like to send a return.
If I try
res.json(200);
or
res.sendStatus(200);
or even
res.sendStatus();
I get the error: Response validation failed: void does not allow a value
I get a parseerror in the swagger editor if I send
res.json()
And I get a void does not allow a value
I feel like I am out of options to try so I could really use some input.