File: unannotated_echo_service.swagger.yaml

package info (click to toggle)
golang-github-grpc-ecosystem-grpc-gateway 2.20.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,236 kB
  • sloc: javascript: 357; makefile: 147; sh: 26
file content (119 lines) | stat: -rw-r--r-- 4,147 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
openapiOptions:
  file:
    # the file name must be the same as one passed to protoc when generating generating .swagger.json
    - file: "examples/internal/proto/examplepb/unannotated_echo_service.proto"
      option:
        info:
          title: Unannotated Echo
          contact:
            name: gRPC-Gateway project
            url: https://github.com/grpc-ecosystem/grpc-gateway
            email: none@example.com
          license:
            name: BSD 3-Clause License
            url: https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE
          version: "1.0"
          extensions:
            x-something-something: yadda
        tags:
          - name: Echo
            description: Echo description
          - name: Internal
            description: Internal description
            extensions:
              x-traitTag: true
        schemes:
          - HTTP
          - HTTPS
          - WSS
        consumes:
          - application/json
          - application/x-foo-mime
        produces:
          - application/json
          - application/x-foo-mime
        responses:
          "403":
            description: Returned when the user does not have permission to access the resource.
          "404":
            description: Returned when the resource does not exist.
            schema:
              jsonSchema:
                type:
                  - STRING
        securityDefinitions:
          security:
            ApiKeyAuth:
              type: TYPE_API_KEY
              name: X-API-Key
              in: IN_HEADER
              extensions:
                x-amazon-apigateway-authorizer:
                  authorizerResultTtlInSeconds: 60
                  type: token
                x-amazon-apigateway-authtype: oauth2
            BasicAuth:
              type: TYPE_BASIC
        security:
          - securityRequirement:
              ApiKeyAuth: {}
              BasicAuth: {}
          - securityRequirement:
              ApiKeyAuth: {}
              OAuth2:
                scope:
                  - read
                  - write
        externalDocs:
          description: More about gRPC-Gateway
          url: https://github.com/grpc-ecosystem/grpc-gateway
        extensions:
          x-grpc-gateway-baz-list:
            - one
            - true
          x-grpc-gateway-foo: bar
  service:
    - service: grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService
      option:
        description: "UnannotatedEchoService description -- which should not be used in place of the documentation comment!"
        external_docs:
          url: "https://github.com/grpc-ecosystem/grpc-gateway"
          description: "Find out more about UnannotatedEchoService"
  method:
    - method: grpc.gateway.examples.internal.proto.examplepb.UnannotatedEchoService.Echo
      option:
        description: "Description Echo"
        summary: "Summary: Echo rpc"
        external_docs:
          url: "https://github.com/grpc-ecosystem/grpc-gateway"
          description: "Find out more Echo"
        responses:
          "200":
            examples:
              "application/json": '{"value": "the input value"}'
          "503":
            description: Returned when the resource is temporarily unavailable.
            extensions:
              x-number: 100
          "404":
            description: Returned when the resource does not exist.
            schema:
              jsonSchema:
                type: [INTEGER]
  message:
    - message: grpc.gateway.examples.internal.proto.examplepb.UnannotatedSimpleMessage
      option:
        json_schema:
          title: "A bit of everything"
          description: "A simple message with many types"
          required: ["id"]
        external_docs:
          url: "https://github.com/grpc-ecosystem/grpc-gateway"
          description: "Find out more about UnannotatedSimpleMessage"
        example: '{"id": "myid"}'
  field:
    - field: grpc.gateway.examples.internal.proto.examplepb.UnannotatedSimpleMessage.num
      option:
        description: "Int value field"
        default: "42"
        required: ["num"]