You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.
Hello,
It seems I am unable to validate a json repsonse from a controller as a valid schema defined in swagger json.
Attached screenshot test passes if my swagger.json contains the code below
{ "swagger": "2.0", "info": { "version": "1", "title": "my client" }, "consumes": [ "application/json" ], "produces": [ "application/json" ], "securityDefinitions": { "GatewayToken": { "type": "apiKey", "in": "header", "name": "X-Authenticated-UserID" } }, "paths": { "/children": { "get": { "tags": [ "children" ], "summary": "One children wit its parent", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Parent" } } } } } }, "definitions": { "Parent": { "type": "object", "properties": { "name": { "type": "string" }, "job": { "type": "string" }, "children": { "allOf": [ { "$ref": "#/definitions/Children" } ] } } }, "Children": { "type": "object", "properties": { "firstName": { "type": "string" } } } } }
Object key is not 'firstName' but 'name' and the test pass. Did I miss something ?
The text was updated successfully, but these errors were encountered: