Skip to content

bug: Properties must have an example defined #42

@marcosanz-apiquality

Description

@marcosanz-apiquality

DO NOT SUBMIT SECURITY REPORTS HERE

If you have a security vulnerability, please report it following our security policy.

Bug Report

Amazing GitHub Template version:

Current behavior:

Image

When you define the response with properties the rule OAR031 show an error:

Image

Expected behavior:

I expected that the rule don't give error.

Steps to reproduce:

Create an openapi with a response with:

migracion_get_response:
  description: Datos de la consulta migración obtenidos exitosamente.
  headers:
    x-trace-id:
      schema:
        $ref: '#/components/schemas/id'
  content:
    application/json:
      schema:
        allOf:
          - $ref: '#/components/schemas/standard_response_with_metadata'
        properties:
          data:
            type: object
            properties:
              migraciones:
                type: array
                items:
                  $ref: '#/components/schemas/migracion_get_response'
      examples:
        Ejemplo 1:
          $ref: '#/components/examples/migracion_get_response'

Related code:

insert short code snippets here

Other information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions