# Generated with protoc-gen-openapi # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi openapi: 3.0.3 info: title: Demo API description: 定义服务 version: 0.0.1 paths: /demo/create: post: tags: - Demo operationId: Demo_Create requestBody: content: application/json: schema: $ref: '#/components/schemas/demo.CreateReq' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/demo.OKRep' /demo/delete: get: tags: - Demo operationId: Demo_Delete parameters: - name: id in: query schema: type: integer format: int64 responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/demo.OKRep' /demo/get: get: tags: - Demo operationId: Demo_Get parameters: - name: id in: query schema: type: integer format: int64 responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/demo.DemoModel' /demo/hello/{name}: get: tags: - Demo operationId: Demo_Hello parameters: - name: name in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/demo.HelloRep' /demo/list: get: tags: - Demo operationId: Demo_List parameters: - name: page in: query schema: type: integer format: int64 - name: size in: query schema: type: integer format: int64 responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/demo.ListRep' /demo/update: post: tags: - Demo operationId: Demo_Update requestBody: content: application/json: schema: $ref: '#/components/schemas/demo.UpdateReq' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/demo.OKRep' components: schemas: demo.CreateReq: type: object properties: name: type: string value: type: string demo.DemoModel: type: object properties: id: type: integer format: int64 name: type: string value: type: string createdAt: type: integer format: int64 updatedAt: type: integer format: int64 demo.HelloRep: type: object properties: message: type: string demo.ListRep: type: object properties: list: type: array items: $ref: '#/components/schemas/demo.DemoModel' demo.OKRep: type: object properties: {} demo.UpdateReq: type: object properties: id: type: integer format: int64 name: type: string value: type: string tags: - name: Demo