module.exports =
body:
login: type: 'string'
password: type: 'string'
response:
200:
type: 'object'
required: ['success']
properties:
success: type: 'boolean'
err: type: 'string'
user:
required: ['user', 'login']
user: type: 'number'
# user is required iff success
# err is required otherwise
if:
success:
const: true
then:
required: ['user']
else:
required: ['err']