-
-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
We have some specs (that I don't agree are good specs per se) that are technically valid but aren't passing oas-schema-check.
For example:
CloudAppDataset:
allOf:
- $ref: '#/components/schemas/CloudAppDatasetCreate'
- type: object
required:
- datasetId
- status
properties:
datasetId:
type: string
minLength: 1
maxLength: 50
description: Unique identifier for the CloudApp dataset.
example: tdi_dataset_01n2xcejqtf2nbrexx3vqjhp15throws
#0 251.3 Rule: oas-schema-check
#0 251.3 - Severity: error
#0 251.3 - Message: `required` field `status` is not defined in `properties`
#0 251.3 - Path: $.components.schemas['WarehouseDataset'].allOf[1].required[1]
#0 251.3 - How to fix:
#0 251.3 Make sure each schema has a value type defined. Without a type, the schema is uselesstechnically required is only checkable on the instance of an object (which is a whole other thing and means you can't really check it at build time), but I think for the spirit of this schema checker is that at least for allOf it needs to check the completed object not just each arm
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels