FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • Recommended

    operation-operationId


    Formats: Severity:

    Every operation must have an operationId. It’s critical that all Operation’s have an identifier.

    An operationId is used by documentation tools, code generators and mocking engines. It’s used to define page names, URI’s and method names in auto-generated code.

    Why did this violation appear?

    There is an Operation in your specification that has not defined an operationId.

    What is this rule checking for?

    Every Operation is checked for the following

    • Operation ID

    A bad example

    "/pet":
      post:
        responses:
          '200':
            description: New pet was added, great job.
    

    A good example

    "/pet":
      post:
        operationId: createNewPet
        responses:
          '200':
            description: New pet added, great job. 
    

    How do I fix this violation?

    Every single Operation needs an operationId. It’s a critical requirement to be able to identify each individual operation uniquely. Ensure all operations have an operationId