We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validateOuput()
validateOutput() is not producing expected error when response doesn't match OAS schema that includes an internal $ref
$ref
openapi: 3.0.0 info: description: service description version: '0.1' title: service title tags: - name: tag1 description: tag1 description paths: "/test": get: tags: - tag1 summary: '' description: '' operationId: testCreateOne responses: '200': description: '' content: application/json: schema: "$ref": "#/components/schemas/TestCreateOneResponse" components: schemas: TestCreateOneResponse: type: object description: '' properties: output: "$ref": "#/components/schemas/OutputType" required: - output OutputType: type: string description: ''
Error not produced when response does not match OAS schema that includes an internal $ref. See #2363 for more details.
{ "_tag":"Right", "right":{ "statusCode":200, "headers":{ "x-powered-by":"Express", "content-type":"application/json; charset=utf-8", "content-length":"2", "etag":"W/\"2-vyGp6PvFo4RvsFtPoIWeCReyIC8\"" }, "body":{ } } }
Error should be produced when response does not match OAS schema that includes an internal $ref. See #2363 for more details.
{ "_tag":"Left", "left":[ { "path":[ "body" ], "code":"required", "message":"Request body must have required property 'output'", "severity":0 } ] }
See #2363
See test case
Using example schema
{ "schema":{ "type":"object", "properties":{ "output":{ "$ref":"#/__bundled__/OutputType" } }, "required":[ "output" ] } }
With empty body
{ "body": {} }
validateOutput() did not produce any errors. Expected error about required property output
output
The text was updated successfully, but these errors were encountered:
This was released in version 5.3.1.
Sorry, something went wrong.
No branches or pull requests
Context
validateOutput() is not producing expected error when response doesn't match OAS schema that includes an internal
$ref
Current Behavior
Error not produced when response does not match OAS schema that includes an internal
$ref
. See #2363 for more details.Expected Behavior
Error should be produced when response does not match OAS schema that includes an internal
$ref
. See #2363 for more details.Possible Workaround/Solution
See #2363
Steps to Reproduce
See test case
Using example schema
With empty body
{ "body": {} }
validateOutput() did not produce any errors. Expected error about required property
output
Environment
The text was updated successfully, but these errors were encountered: