Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix prefix not start with / #54

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

bensonfx
Copy link
Contributor

Issue:

定义prefix 不以 / 开始时,生成openapi 2.0文档lint报错

@server(
    prefix: api/v1
    group: user
)
service loopx-api {
    @handler Login
    post /user/login (UserLoginReq) returns (UserInfoReply)
}

生成的openapi2.0

"api/v1/user/login": {
      "post": {
        "operationId": "Login",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/UserInfoReply"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserLoginReq"
            }
          }
        ],
        "tags": [
          "user"
        ]
      }
    },

@bensonfx
Copy link
Contributor Author

@MaxToby pls review it.

@MaxToby MaxToby merged commit 3ff75d2 into zeromicro:main Sep 27, 2022
@bensonfx bensonfx deleted the fix_prefix_not_start_with_slash branch September 27, 2022 23:42
libvirgo pushed a commit to libvirgo/goctl-swagger that referenced this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants