HenrikHL
3 years agoFrequent Contributor
Non-existent required fields
Hi,
I am wondering why the Validator of SwaggerHub does not report at least a Warning if I have listed a field as required without the field existing in the object?
Example:
components:
schemas:
container:
type: object
description: bla bla bla
allOf:
- type: object
properties:
containerReference:
$ref: '#/components/schemas/equipmentReference'
- type: object
properties:
ISOCode:
$ref: '#/components/schemas/ISOEquipmentCode'
required:
- equipmentReference
As can be seen above the object "container" has defined equipmentReference as a required field. Problem is that this field was renamed from equipmentReference --> containerReference
It would be nice if SwaggerHub reports such an error in the Validation