|
| 1 | +# Generated with protoc-gen-openapi |
| 2 | +# https://github.com/fern-api/protoc-gen-openapi/tree/master/cmd/protoc-gen-openapi |
| 3 | + |
| 4 | +openapi: 3.0.3 |
| 5 | +info: |
| 6 | + title: OneOfService API |
| 7 | + description: Service definition |
| 8 | + version: 0.0.1 |
| 9 | +paths: |
| 10 | + /v1/payments: |
| 11 | + post: |
| 12 | + tags: |
| 13 | + - OneOfService |
| 14 | + operationId: OneOfService_CreatePayment |
| 15 | + requestBody: |
| 16 | + content: |
| 17 | + application/json: |
| 18 | + schema: |
| 19 | + $ref: '#/components/schemas/OneOfMessage' |
| 20 | + required: true |
| 21 | + responses: |
| 22 | + "200": |
| 23 | + description: OK |
| 24 | + content: |
| 25 | + application/json: |
| 26 | + schema: |
| 27 | + $ref: '#/components/schemas/OneOfMessage' |
| 28 | + default: |
| 29 | + description: Default error response |
| 30 | + content: |
| 31 | + application/json: |
| 32 | + schema: |
| 33 | + $ref: '#/components/schemas/Status' |
| 34 | + x-fern-sdk-group-name: OneOfService |
| 35 | + x-fern-sdk-method-name: CreatePayment |
| 36 | +components: |
| 37 | + schemas: |
| 38 | + EmptyOneOf: |
| 39 | + type: object |
| 40 | + properties: {} |
| 41 | + x-fern-type-name: EmptyOneOf |
| 42 | + source: tests/oneof/message.proto |
| 43 | + GoogleProtobufAny: |
| 44 | + type: object |
| 45 | + properties: |
| 46 | + '@type': |
| 47 | + type: string |
| 48 | + description: The type of the serialized message. |
| 49 | + additionalProperties: true |
| 50 | + description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. |
| 51 | + x-fern-encoding: |
| 52 | + proto: |
| 53 | + type: google.protobuf.Any |
| 54 | + OneOfMessage: |
| 55 | + type: object |
| 56 | + properties: |
| 57 | + id: |
| 58 | + type: string |
| 59 | + description: Identifier for the message |
| 60 | + x-fern-encoding: |
| 61 | + proto: |
| 62 | + type: google.protobuf.StringValue |
| 63 | + credit_card: |
| 64 | + type: string |
| 65 | + x-fern-encoding: |
| 66 | + proto: |
| 67 | + type: google.protobuf.StringValue |
| 68 | + bank_transfer: |
| 69 | + type: string |
| 70 | + x-fern-encoding: |
| 71 | + proto: |
| 72 | + type: google.protobuf.StringValue |
| 73 | + digital_wallet: |
| 74 | + type: string |
| 75 | + x-fern-encoding: |
| 76 | + proto: |
| 77 | + type: google.protobuf.StringValue |
| 78 | + authentication_config: |
| 79 | + $ref: '#/components/schemas/EmptyOneOf' |
| 80 | + description: Message demonstrating oneof field usage |
| 81 | + x-fern-type-name: OneOfMessage |
| 82 | + source: tests/oneof/message.proto |
| 83 | + Status: |
| 84 | + type: object |
| 85 | + properties: |
| 86 | + code: |
| 87 | + type: integer |
| 88 | + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. |
| 89 | + format: int32 |
| 90 | + message: |
| 91 | + type: string |
| 92 | + description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. |
| 93 | + details: |
| 94 | + type: array |
| 95 | + items: |
| 96 | + $ref: '#/components/schemas/GoogleProtobufAny' |
| 97 | + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 98 | + description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).' |
| 99 | +tags: |
| 100 | + - name: OneOfService |
0 commit comments