Closed kfpo closed 3 years ago
Hello! I have few questions/issues with meta options:
swagger
className
const schema = Joi.string().meta({ className: 'Email', swagger: { format: 'email' } }); const { components } = j2s(schema)
Expecting:
components // => { Email: { type: 'string', format: 'email' } }
Got:
components // => { Email: { type: 'string' } }
swaggerOverride
Perhaps it was made intentionally, but maybe this info should be added to Readme?
Versions:
A very late answer: I don't know if it was intended, but I think there is no reason to support it. So I changed the behavior with version 6
Hello! I have few questions/issues with meta options:
swagger
can't be used withclassName
, since it returns before override: https://github.com/Twipped/joi-to-swagger/blob/00b1fb88d00ef8f2f0964eb64131ca120620ed65/index.js#L380 https://github.com/Twipped/joi-to-swagger/blob/00b1fb88d00ef8f2f0964eb64131ca120620ed65/index.js#L384 E.g.:Expecting:
Got:
swaggerOverride
can't be used withclassName
, since it returns no components in this case: https://github.com/Twipped/joi-to-swagger/blob/00b1fb88d00ef8f2f0964eb64131ca120620ed65/index.js#L320Perhaps it was made intentionally, but maybe this info should be added to Readme?
Versions: