Skip to content

Default validators do not check if OperationId is unique #2448

@bara-pweber

Description

@bara-pweber

Describe the bug
If I validate a OpenApi document which uses a OperationId twice with hidi 2.0.0, I do not get a validation error.

OpenApi File To Reproduce

openapi: 3.0.0
info:
  title: Duplicate OperationId Example
  version: 1.0.0

paths:
  /users:
    get:
      summary: Get all users
      operationId: getUsers
      responses:
        '200':
          description: A list of users
  /admins:
    get:
      summary: Get all admins
      operationId: getUsers  # <-- Duplicate operationId
      responses:
        '200':
          description: A list of admins

Expected behavior
A validation error occurs and the duplicate OperationIds are pointed out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions