knuckleswtf/scribe

Is it possible to add @operationId prop for each methods ?

liverocaisson opened this issue · 3 comments

To be able to match with openapi-generator-cli spec.
https://github.com/OpenAPITools/openapi-generator-cli

Is it possible to add an operationId property for each methods, and add it in the OpenAPISpecWriter.php ?

And generate an openapi.yml with operationId prop.

example of wanted openapi.yml file :


get:
  tags:
    - appsFoo
  operationId: getBar
  responses:
    '200':
      description: OK
      content:
        application/json:
          schema:
            $ref: ./components/bar_response.yaml
          examples:
            default:
              $ref: ./examples/default.yaml
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: ../../../components/error_response.yaml
          examples:
            barInternalError:
              $ref: ./examples/bar_internal_error.yaml

No, this isn't in line with what Scribe is. Scribe is primarily not an OpenAPI generator. If you're concerned about that, we can camel-case the endpoint title to generate an operation ID when generating the spec.

@shalvah yeah It will be great to have that feature.
Thank you.

Done in 4.2.0