You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing swagger with allOf does not work properly.
The following model defined in swagger.yaml
RecipientModelToUpdate:
allOf:
- $ref: '#/definitions/PatientModelToUpdate'
- properties:
acceptable_blood_groups:
description: Provide full list of all the acceptable blood groupsof the patient, not just the change setitems:
$ref: '#/definitions/BloodGroupEnum'type: arrayacceptable_blood_groups2:
description: Provide full list of all the acceptable blood groupsof the patient, not just the change setexample:
- A
- Bitems:
$ref: '#/definitions/BloodGroupEnum'type: arraycutoff:
type: integerhla_antibodies:
allOf:
- $ref: '#/definitions/HlaAntibodiesToUpdate'description: Provide full list of all the HLA antibodies of thepatient, not just the change setexample:
hla_antibodies_list:
- mfi: 10000raw_code: A*01:02hla_types_list_test:
items:
$ref: '#/definitions/HlaTypeToUpdate'type: arrayprevious_transplants:
description: Number of previous kidney transplants.type: integerrecipient_requirements:
allOf:
- $ref: '#/definitions/RecipientRequirements'description: Provide the whole recipients requirements object,it will be overwrittenexample:
require_better_match_in_compatibility_index: truewaiting_since:
description: Date since when the patient has been on waiting list.Use format YYYY-MM-DD.example: '2015-01-17'format: datetype: stringrequired:
- hla_types_list_testtype: object
When I implemented swagger validation, I also got the following error:
jsonschema.exceptions.ValidationError: 'A' is not of type 'array'
Failed validating 'type' in schema['allOf'][1]['properties']['acceptable_blood_groups']:
{'description': '...',
'example': ['A', '0'],
'items': {'$ref': '#/definitions/BloodGroupEnum'},
'type': 'array'}
On instance['acceptable_blood_groups']:
'A'
Parsing swagger with
allOf
does not work properly.The following model defined in swagger.yaml
was parsed using
with unexpected results in
swagger_parser.definitions_example.RecipientModelToUpdate
:Most of the defined fields are missing.
The text was updated successfully, but these errors were encountered: