File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
openapi_core/unmarshalling/schemas Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,10 @@ def __call__(self, value=NoValue):
253253 if one_of_schema :
254254 return self .unmarshallers_factory .create (one_of_schema )(value )
255255
256+ all_of_schema = self ._get_all_of_schema (value )
257+ if all_of_schema :
258+ return self .unmarshallers_factory .create (all_of_schema )(value )
259+
256260 for schema_type in self .SCHEMA_TYPES_ORDER :
257261 unmarshaller = self .unmarshallers_factory .create (
258262 self .schema , type_override = schema_type )
@@ -278,3 +282,17 @@ def _get_one_of_schema(self, value):
278282 continue
279283 else :
280284 return subschema
285+
286+ def _get_all_of_schema (self , value ):
287+ if not self .schema .all_of :
288+ return
289+ for subschema in self .schema .all_of :
290+ if subschema .type == SchemaType .ANY :
291+ continue
292+ unmarshaller = self .unmarshallers_factory .create (subschema )
293+ try :
294+ unmarshaller .validate (value )
295+ except ValidateError :
296+ continue
297+ else :
298+ return subschema
You can’t perform that action at this time.
0 commit comments