Commit graph

13 commits

Author SHA1 Message Date
Artur Maciag
f8e977cc17 Parameters tests 2018-07-09 12:10:05 +01:00
Artur Maciag
4c75f0f9b7 OneOf schema support 2018-05-25 16:50:09 +01:00
Artur Maciag
4e1a61aace Exceptions restructure 2018-05-25 11:30:50 +01:00
Artur Maciag
9b05d7b271 Wrapper restructure 2018-05-25 11:30:50 +01:00
Artur Maciag
7111a91cef Validators restructure 2018-05-25 11:30:50 +01:00
p1c2u
0350562b54 Response JSON text as array fix 2018-04-23 20:40:54 +01:00
amcmanigal
56be4b10eb Fixing Subschema Required Properties Validation
Currently if valid swagger syntax is used for model composition an
error will be thrown due to the lack of a type property. This was
corrected by making object the default type.

schema_type = schema_deref.get('type', 'object')

I changed the swagger definition to test for this. Now PetCreate is a
composite of PetCreatePartOne and PetCreatePartTwo. However, this
caused `test_post_pets_empty_body` to fail, which turned out to be a
bug in the required properties.

In `_unmarshal_object` the `get_all_properties` method is called to get
all properties from the subschemas. However, this is not done for
required properties, meaning that only top level required properties
will be correctly validated. I have added a
`get_all_required_properties’ to fix this.

This caused `test_get_pets` to fail. In this case the bug allowed an
incorrect test case to be introduced. Pet requires `id`, but it also
requires name because it inherits from PetCreate. I have fixed this
test case by adding the missing required property.

After these changes `test_get_pet_not_found` failed due to a string
formatting error (double quotes vs single quotes). I fixed this by
switching to dictionary comparisons.
2018-04-04 10:15:45 -04:00
Artur Maciag
219d1c650e Flask wrapper status code fix 2017-11-06 15:08:21 +00:00
Artur Maciag
128971185a Response data renamed 2017-11-06 14:05:06 +00:00
Artur Maciag
3541793ff3 Check response invalid content type 2017-11-06 13:53:49 +00:00
Artur Maciag
08fdf7c9aa Response validator 2017-11-06 13:32:31 +00:00
Artur Maciag
37f09d7571 Factories and exceptions cleanup 2017-11-03 11:18:48 +00:00
Artur Maciag
9bdb13f654 Request validator 2017-11-02 16:05:25 +00:00