Skip to content

Separate services for same endpoint name #137

@hi2git

Description

@hi2git

Describe the bug
For the same endpoint name with different HTTP verbs gengen generates separate services:
image

To Reproduce
here is the minimal "path" section

"paths": {
    "/sample/test": {
      "get": {
        "tags": [
          "sample"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "sample"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "put": {
        "tags": [
          "sample"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      },
      "delete": {
        "tags": [
          "sample"
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
}

results in swagger
image

Expected behavior
Gengen generates only one service with different methods

Additional context
Such "paths" can be generated by ASP minimal API:

var group = app.MapGroup("sample").WithTags("sample");
group.MapGet("test", () => "test");
group.MapPost("test", () => {});
group.MapPut("test", () => {});
group.MapDelete("test", () => {});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions