Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Unable to use step "the JSON should be valid according to swagger :dumpPath dump schema :schemaName" #270

Description

@Lreus

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
get_children

{ "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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions