Commit graph

16 commits

Author SHA1 Message Date
Artur Maciag
734a4673f8 Schema objects 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
c733f9434a Allow undefined schema type 2018-04-04 11:26:21 +01:00
Artur Maciag
b1f58d7261 Boolean value cast fix 2018-02-28 13:39:23 +00:00
Artur Maciag
2d50e920ab Schema enum 2017-11-14 13:36:05 +00:00
Artur Maciag
1739828559 AllOf support 2017-11-06 16:50:00 +00:00
Artur Maciag
37f09d7571 Factories and exceptions cleanup 2017-11-03 11:18:48 +00:00
Artur Maciag
a86c49d1be Parameter with required and allow empty value support 2017-10-18 14:42:23 +01:00
Artur Maciag
2491454c2a Schema deprecated value 2017-10-17 14:33:46 +01:00
Artur Maciag
943ca126fc Schema deprecated value 2017-10-17 14:23:26 +01:00
Artur Maciag
1ca11c9d19 Schema nullable value 2017-10-17 14:02:21 +01:00
Artur Maciag
be7f55d967 schema strict validation 2017-09-25 15:15:00 +01:00
Artur Maciag
ca413004d3 schemas registry 2017-09-22 09:54:37 +01:00
Artur Maciag
5867126388 components and infos modules; schema registry; models module 2017-09-22 09:14:07 +01:00
Artur Maciag
553b7228b1 initial version 2017-09-21 12:51:37 +01:00