Skip to content

Duplicate operationIds #7

@gannicottb

Description

@gannicottb

Hey, I've been pretty happy with this module so far, I'm just trying to get a clean swagger.json that doesn't throw any errors in editor.swagger.io.

Currently, the generated API docs throw errors of the type:
Cannot have multiple operations with the same operationId: update
Cannot have multiple operations with the same operationId: index
etc...

Detailed error from editor.swagger.io:

code: "DUPLICATE_OPERATIONID"
message: "Cannot have multiple operations with the same operationId: update"
path: Array [4]
0: "paths"
1: "/api/public/users/{id}"
2: "patch"
3: "operationId"
level: 900
type: "Swagger Error"
description: "Cannot have multiple operations with the same operationId: update"

Presumably, this is because the action name is used as the operationId, where perhaps it should be prefixed with the model name/controller name?

Is there a workaround (beyond defining the entire response schema by hand?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions