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

did openapi2proto handle openapiv3 requestBody keyword? generated go file lost all body parameters. #133

Open
moxianfeng opened this issue Jul 22, 2021 · 1 comment

Comments

@moxianfeng
Copy link

moxianfeng commented Jul 22, 2021

did openapi2proto handle openapiv3 requestBody keyword? generated go file lost all body parameters.my openapi like

` '/api/cardmanager/mockcard/{cardNo}':

post:

  tags:
    - cardmanager
    - mockcard
  description: create mock user card
  operationId: CreateMockCard
  requestBody:
    description: 写卡参数
    content:
      application/json:
        schema:
          type: object
          properties:
            sessionKey:
              type: string
            requestId:
              type: string
            data:
              $ref: '#/components/schemas/UserCard'
  parameters:
    - name: cardNo
      in: path
      description: card no
      schema:
        type: string
  responses:
    '200':
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GeneralResponse'`

generated code like

`message CreateMockCardRequest {
// 卡号
string cardNo = 1;
}

rpc CreateMockCard(CreateMockCardRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
        post: "/api/cardmanager/mockcard/:cardNo"
    };
}`
@ThaDaVos
Copy link

I've noticed them missing too - which is pretty sad as I really need them...

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

No branches or pull requests

2 participants