Open SlavMAK opened 3 years ago
Otherwise, the body validator is always empty and does not work.
Can you share your swagger or params that cause the issue?
Just ran into this issue as well, not sure this will get fixed here but I'll mention it in case others run into the same issue.
AdonisJS / Japa has a dependency api-schema-builder for testing. If in your openapi file you use a vendor specific mimetype that contains dots then your res.assertAgainstApiSpec();
tests will fail because api-schema-builder is not using quotes with lodash get.
This will return undefined:
get(
{
response: {
200: { content: { "application/vnd.abc+json": "abc" } },
},
},
"response[200].content[application/vnd.abc+json]"
)
This will work:
get(
{
response: {
200: { content: { "application/vnd.abc+json": "abc" } },
},
},
"response['200'].content['application/vnd.abc+json']"
)
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch
api-schema-builder@2.0.8
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.