Skip to content

Validate the format of examples #766

Open
@tatomyr

Description

@tatomyr

Is your feature request related to a problem? Please describe.

Consider this definition sample:

openapi: 3.0.0

components:
  parameters:
    foo:
      in: query
      name: foo
      schema:
        type: string
        format: ipv4
      example: wrong

Although the example is wrong, linter doesn't recognise this.

Describe the solution you'd like
It would be great if no-invalid-parameter-examples rule could take format into account as well.

Describe alternatives you've considered
None

Additional context

See more details here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementgovernanceIssues relating to problems with or requests for API governance/linting/decoratingp3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions