fixed #44 : added a non-regression test

This commit is contained in:
Hugo de Paix de Coeur
2016-04-04 20:14:52 +02:00
parent c131a8cad8
commit ae8961d43c
2 changed files with 7 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ _Discriminator_ : petType
|=== |===
|Name|Description|Required|Schema|Default|Example |Name|Description|Required|Schema|Default|Example
|huntingSkill|The measured skill for hunting|true|enum (clueless, lazy, adventurous, aggressive)|lazy| |huntingSkill|The measured skill for hunting|true|enum (clueless, lazy, adventurous, aggressive)|lazy|
|name||true|string|| |name|conflicting property with inheriting model (issue #44)|false|string||
|petType||true|string|| |petType||true|string||
|=== |===
@@ -51,7 +51,7 @@ Collection parent type without discriminator
[[_dog]] [[_dog]]
=== Dog === Dog
A representation of a dog with a conflicting discriminator A representation of a dog with an alternative discriminator
[%hardbreaks] [%hardbreaks]
_Polymorphism_ : Inheritance _Polymorphism_ : Inheritance

View File

@@ -79,6 +79,10 @@
{ {
"type": "object", "type": "object",
"properties": { "properties": {
"name": {
"type": "string",
"description": "conflicting property with inheriting model (issue #44)"
},
"huntingSkill": { "huntingSkill": {
"type": "string", "type": "string",
"description": "The measured skill for hunting", "description": "The measured skill for hunting",
@@ -98,7 +102,7 @@
] ]
}, },
"Dog": { "Dog": {
"description": "A representation of a dog with a conflicting discriminator", "description": "A representation of a dog with an alternative discriminator",
"allOf": [ "allOf": [
{ {
"$ref": "#/definitions/Pet" "$ref": "#/definitions/Pet"