IBM/openapi-validator

"Every operation must have unique "operationId""?

jfoclpf opened this issue · 1 comments

If I have a reference to another path, why am I requested to provide a different id?

I am getting Every operation must have unique "operationId" error

  Message :   Every operation must have unique "operationId".
  Rule    :   operation-operationId-unique
  Path    :   paths./municipios/{municipio}.get.operationId
  Line    :   209

I am using v 0.96.2 and this is the YAML

  /municipios/{municipio}:
    get:
      operationId: getMunicipality
      summary: Obter detalhes sobre Município  
      parameters:
        - in: path
          name: municipio
          required: true
          schema:
            type: string
            example: évora
          allowReserved: true
          description: Município
        - $ref: '#/components/parameters/json'
      responses:
        '200':
          description: Detalhes do Município
          content:
            application/json:
              schema:
                type: string
        '404':
          description: Município não encontrado
          content:
            application/json:
              schema:
                type: string

  /municipio/{municipio}: # when I remove this path and $ref, it works
    $ref: '#/paths/~1municipios~1%7Bmunicipio%7D'

Each operation should have a unique identifier, regardless of what path they live under