Closed JKEnv closed 2 years ago
Could you please add a test case for it?
const joiObj = Joi.object().pattern(/^/, Joi.object().keys({name: Joi.string()}));
let TestMap = j2s(joiObj).swagger;
with the current implementation it gets me the following:
with my pull request it gets me:
What I meant was, if you could please add a unit test (case) for it to the tests.js file. Sorry for being not specific enough in the first place.
Oh, thanks for the more precise definition. I've added some tests to prove my point
Thank you for the PR, will release a new version soon. Closes #94
This fix enables the following swagger function: https://swagger.io/docs/specification/data-models/dictionaries/
This is how its done via Joi: Joi.object().pattern(/^/, Joi.object({name: Joi.string()}))
I've tested this in a personal project.