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

[BUG]: 生成的swagger文档中RPC的Request描述信息不足 #19

Open
1 task done
gdlxSong opened this issue Nov 23, 2021 · 0 comments
Open
1 task done

[BUG]: 生成的swagger文档中RPC的Request描述信息不足 #19

gdlxSong opened this issue Nov 23, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@gdlxSong
Copy link

What happened?

Snippet

service Entity {
	rpc CreateEntity (CreateEntityRequest) returns (EntityResponse) {
		option (google.api.http) = {
			post : "/plugins/{plugin}/entities"
			body: "properties"
		};
	};
\....
}

message CreateEntityRequest {
    string id = 1;
    string plugin = 2;
    string source = 3;
    string owner = 4;
    string type = 5;
    google.protobuf.Value properties = 6;
 }

Generate Swagger Docs

 "/plugins/{plugin}/entities": {
      "post": {
        "operationId": "Entity_CreateEntity",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1EntityResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "plugin",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Entity"
        ]
      }
    },

Version

0.1.0 (Default)

What OS are you seeing the problem on?

Windows11 x86

Relevant log output

No response

Other

None

Contact Details

No response

Code of Conduct

  • I agree to follow this project
@gdlxSong gdlxSong added the bug Something isn't working label Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants