Skip to content

Add a type-check for the linting-rules #433

@maxl2287

Description

@maxl2287

Problem description
In SimSwap we discovered that there was a property defined without having the type-attribute set.
See camaraproject/SimSwap#195

Possible evolution
Add a spectral-rule for checking the type-attribute.

e.g.

camara-schema-type-check:
  message: "Invalid or missing type in schema definition."
  severity: error
  given: "$.components.schemas.*"
  then:
    field: type
    function: pattern
    functionOptions:
      match: "^(string|number|integer|boolean|array|object)$"
  recommended: true

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions