DO NOT SUBMIT SECURITY REPORTS HERE
If you have a security vulnerability, please report it following our security policy.
Bug Report
Amazing GitHub Template version:
2.4.0
Current behavior:
When an endpoint has a 204 No Content successful response (no body), o2p creates
the schemaTest variable in the environment but with no value. At test execution,
ajv.compile(null) throws: schema should be object or boolean.
This also propagates to all 4xx test cases of that endpoint, since there is no
success schema to derive the error schema from.
Expected behavior:
204 No Content responses have no body, so no schemaTest variable or AJV validation
block should be generated for them.
Steps to reproduce:
- Define an endpoint with a 204 No Content successful response in the OpenAPI spec
- Set validate_schema: true in the o2p config
- Generate the collection
- Run the collection in Postman → schemaTest is null → AJV crash
Related code:
src/generator/validateSchema.js
DO NOT SUBMIT SECURITY REPORTS HERE
If you have a security vulnerability, please report it following our security policy.
Bug Report
Amazing GitHub Template version:
2.4.0
Current behavior:
When an endpoint has a 204 No Content successful response (no body), o2p creates
the schemaTest variable in the environment but with no value. At test execution,
ajv.compile(null) throws: schema should be object or boolean.
This also propagates to all 4xx test cases of that endpoint, since there is no
success schema to derive the error schema from.
Expected behavior:
204 No Content responses have no body, so no schemaTest variable or AJV validation
block should be generated for them.
Steps to reproduce:
Related code:
src/generator/validateSchema.js