diff --git a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi.yaml b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi.yaml index 77764502..8815ea6f 100644 --- a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi.yaml @@ -62,7 +62,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListShelves x-fern-request-name: ListShelvesRequest @@ -89,7 +89,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateShelf x-fern-request-name: CreateShelfRequest @@ -118,7 +118,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetShelf x-fern-request-name: GetShelfRequest @@ -143,7 +143,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteShelf x-fern-request-name: DeleteShelfRequest @@ -198,7 +198,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListBooks x-fern-request-name: ListBooksRequest @@ -232,7 +232,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateBook x-fern-request-name: CreateBookRequest @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetBook x-fern-request-name: GetBookRequest @@ -317,7 +317,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: UpdateBook x-fern-request-name: UpdateBookRequest @@ -348,7 +348,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteBook x-fern-request-name: DeleteBookRequest @@ -391,7 +391,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MoveBook x-fern-request-name: MoveBookRequest @@ -433,7 +433,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MergeShelves x-fern-request-name: MergeShelvesRequest @@ -515,6 +515,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' ListBooksResponse: type: object properties: @@ -643,21 +659,5 @@ components: description: A Shelf contains a collection of books with a theme. x-fern-type-name: Shelf source: google/example/library/v1/library.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: LibraryService diff --git a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_default_response.yaml index 77764502..8815ea6f 100644 --- a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_default_response.yaml @@ -62,7 +62,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListShelves x-fern-request-name: ListShelvesRequest @@ -89,7 +89,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateShelf x-fern-request-name: CreateShelfRequest @@ -118,7 +118,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetShelf x-fern-request-name: GetShelfRequest @@ -143,7 +143,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteShelf x-fern-request-name: DeleteShelfRequest @@ -198,7 +198,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListBooks x-fern-request-name: ListBooksRequest @@ -232,7 +232,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateBook x-fern-request-name: CreateBookRequest @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetBook x-fern-request-name: GetBookRequest @@ -317,7 +317,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: UpdateBook x-fern-request-name: UpdateBookRequest @@ -348,7 +348,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteBook x-fern-request-name: DeleteBookRequest @@ -391,7 +391,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MoveBook x-fern-request-name: MoveBookRequest @@ -433,7 +433,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MergeShelves x-fern-request-name: MergeShelvesRequest @@ -515,6 +515,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' ListBooksResponse: type: object properties: @@ -643,21 +659,5 @@ components: description: A Shelf contains a collection of books with a theme. x-fern-type-name: Shelf source: google/example/library/v1/library.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: LibraryService diff --git a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_flatten_oneofs.yaml index 77764502..8815ea6f 100644 --- a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_flatten_oneofs.yaml @@ -62,7 +62,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListShelves x-fern-request-name: ListShelvesRequest @@ -89,7 +89,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateShelf x-fern-request-name: CreateShelfRequest @@ -118,7 +118,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetShelf x-fern-request-name: GetShelfRequest @@ -143,7 +143,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteShelf x-fern-request-name: DeleteShelfRequest @@ -198,7 +198,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListBooks x-fern-request-name: ListBooksRequest @@ -232,7 +232,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateBook x-fern-request-name: CreateBookRequest @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetBook x-fern-request-name: GetBookRequest @@ -317,7 +317,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: UpdateBook x-fern-request-name: UpdateBookRequest @@ -348,7 +348,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteBook x-fern-request-name: DeleteBookRequest @@ -391,7 +391,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MoveBook x-fern-request-name: MoveBookRequest @@ -433,7 +433,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MergeShelves x-fern-request-name: MergeShelvesRequest @@ -515,6 +515,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' ListBooksResponse: type: object properties: @@ -643,21 +659,5 @@ components: description: A Shelf contains a collection of books with a theme. x-fern-type-name: Shelf source: google/example/library/v1/library.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: LibraryService diff --git a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_fq_schema_naming.yaml index 867de8a3..bc7481c8 100644 --- a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_fq_schema_naming.yaml @@ -65,6 +65,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListShelves + x-fern-request-name: ListShelvesRequest post: tags: - LibraryService @@ -91,6 +92,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateShelf + x-fern-request-name: CreateShelfRequest /v1/shelves/{shelf}: get: tags: @@ -119,6 +121,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetShelf + x-fern-request-name: GetShelfRequest delete: tags: - LibraryService @@ -143,6 +146,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteShelf + x-fern-request-name: DeleteShelfRequest /v1/shelves/{shelf}/books: get: tags: @@ -197,6 +201,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListBooks + x-fern-request-name: ListBooksRequest post: tags: - LibraryService @@ -230,6 +235,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateBook + x-fern-request-name: CreateBookRequest /v1/shelves/{shelf}/books/{book}: get: tags: @@ -264,6 +270,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetBook + x-fern-request-name: GetBookRequest put: tags: - LibraryService @@ -313,6 +320,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: UpdateBook + x-fern-request-name: UpdateBookRequest delete: tags: - LibraryService @@ -343,6 +351,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteBook + x-fern-request-name: DeleteBookRequest /v1/shelves/{shelf}/books/{book}:move: post: tags: @@ -385,6 +394,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MoveBook + x-fern-request-name: MoveBookRequest /v1/shelves/{shelf}:merge: post: tags: @@ -426,6 +436,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MergeShelves + x-fern-request-name: MergeShelvesRequest components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_json.yaml index a4db0ad0..ffd46703 100644 --- a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_json.yaml @@ -62,7 +62,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListShelves x-fern-request-name: ListShelvesRequest @@ -89,7 +89,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateShelf x-fern-request-name: CreateShelfRequest @@ -118,7 +118,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetShelf x-fern-request-name: GetShelfRequest @@ -143,7 +143,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteShelf x-fern-request-name: DeleteShelfRequest @@ -198,7 +198,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListBooks x-fern-request-name: ListBooksRequest @@ -232,7 +232,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateBook x-fern-request-name: CreateBookRequest @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetBook x-fern-request-name: GetBookRequest @@ -317,7 +317,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: UpdateBook x-fern-request-name: UpdateBookRequest @@ -348,7 +348,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteBook x-fern-request-name: DeleteBookRequest @@ -391,7 +391,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MoveBook x-fern-request-name: MoveBookRequest @@ -433,7 +433,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MergeShelves x-fern-request-name: MergeShelvesRequest @@ -515,6 +515,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' ListBooksResponse: type: object properties: @@ -643,21 +659,5 @@ components: description: A Shelf contains a collection of books with a theme. x-fern-type-name: Shelf source: google/example/library/v1/library.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: LibraryService diff --git a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_string_enum.yaml index 77764502..8815ea6f 100644 --- a/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_string_enum.yaml @@ -62,7 +62,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListShelves x-fern-request-name: ListShelvesRequest @@ -89,7 +89,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateShelf x-fern-request-name: CreateShelfRequest @@ -118,7 +118,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetShelf x-fern-request-name: GetShelfRequest @@ -143,7 +143,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteShelf x-fern-request-name: DeleteShelfRequest @@ -198,7 +198,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: ListBooks x-fern-request-name: ListBooksRequest @@ -232,7 +232,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: CreateBook x-fern-request-name: CreateBookRequest @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: GetBook x-fern-request-name: GetBookRequest @@ -317,7 +317,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: UpdateBook x-fern-request-name: UpdateBookRequest @@ -348,7 +348,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: DeleteBook x-fern-request-name: DeleteBookRequest @@ -391,7 +391,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MoveBook x-fern-request-name: MoveBookRequest @@ -433,7 +433,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: LibraryService x-fern-sdk-method-name: MergeShelves x-fern-request-name: MergeShelvesRequest @@ -515,6 +515,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' ListBooksResponse: type: object properties: @@ -643,21 +659,5 @@ components: description: A Shelf contains a collection of books with a theme. x-fern-type-name: Shelf source: google/example/library/v1/library.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: LibraryService diff --git a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi.yaml index bf6ba222..9ae1ff0b 100644 --- a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi.yaml @@ -29,7 +29,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -65,7 +65,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -82,22 +82,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/additional_bindings/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -113,5 +98,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/additional_bindings/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_default_response.yaml index bf6ba222..9ae1ff0b 100644 --- a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_default_response.yaml @@ -29,7 +29,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -65,7 +65,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -82,22 +82,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/additional_bindings/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -113,5 +98,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/additional_bindings/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_flatten_oneofs.yaml index bf6ba222..9ae1ff0b 100644 --- a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_flatten_oneofs.yaml @@ -29,7 +29,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -65,7 +65,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -82,22 +82,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/additional_bindings/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -113,5 +98,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/additional_bindings/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_fq_schema_naming.yaml index 0c4d8319..7461dd42 100644 --- a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_fq_schema_naming.yaml @@ -32,6 +32,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage + x-fern-request-name: Message /v1/messages/{message_id}: patch: tags: @@ -67,6 +68,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage + x-fern-request-name: Message components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_json.yaml index 40119906..6d91103d 100644 --- a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_json.yaml @@ -29,7 +29,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -65,7 +65,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -82,22 +82,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/additional_bindings/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -113,5 +98,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/additional_bindings/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_string_enum.yaml index bf6ba222..9ae1ff0b 100644 --- a/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/additional_bindings/openapi_string_enum.yaml @@ -29,7 +29,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -65,7 +65,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -82,22 +82,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/additional_bindings/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -113,5 +98,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/additional_bindings/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi.yaml index c041909c..17b8bacc 100644 --- a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -64,6 +64,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -99,21 +115,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_Sub source: tests/allofwrap/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_default_response.yaml index c041909c..17b8bacc 100644 --- a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_default_response.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -64,6 +64,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -99,21 +115,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_Sub source: tests/allofwrap/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_flatten_oneofs.yaml index c041909c..17b8bacc 100644 --- a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_flatten_oneofs.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -64,6 +64,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -99,21 +115,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_Sub source: tests/allofwrap/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_fq_schema_naming.yaml index bd18e162..445d60db 100644 --- a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_fq_schema_naming.yaml @@ -38,6 +38,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage + x-fern-request-name: Message components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_json.yaml index d4e8c418..13c9a049 100644 --- a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_json.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -64,6 +64,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -99,21 +115,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_Sub source: tests/allofwrap/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_string_enum.yaml index c041909c..17b8bacc 100644 --- a/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/allofwrap/openapi_string_enum.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -64,6 +64,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -99,21 +115,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_Sub source: tests/allofwrap/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi.yaml index c4bcb5b6..9d3171fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -55,22 +55,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/bodymapping/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -86,5 +71,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/bodymapping/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_default_response.yaml index c4bcb5b6..9d3171fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_default_response.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -55,22 +55,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/bodymapping/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -86,5 +71,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/bodymapping/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_flatten_oneofs.yaml index c4bcb5b6..9d3171fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_flatten_oneofs.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -55,22 +55,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/bodymapping/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -86,5 +71,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/bodymapping/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_fq_schema_naming.yaml index bf49a497..6c0b012e 100644 --- a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_fq_schema_naming.yaml @@ -41,6 +41,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage + x-fern-request-name: Message components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_json.yaml index 857df421..a5eddc20 100644 --- a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_json.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -55,22 +55,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/bodymapping/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -86,5 +71,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/bodymapping/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_string_enum.yaml index c4bcb5b6..9d3171fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/bodymapping/openapi_string_enum.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -55,22 +55,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Message: - type: object - properties: - message_id: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - text: - type: string - x-fern-encoding: - proto: - type: google.protobuf.StringValue - x-fern-type-name: Message - source: tests/bodymapping/message.proto - Status: + GoogleRpcStatus: type: object properties: code: @@ -86,5 +71,20 @@ components: $ref: '#/components/schemas/GoogleProtobufAny' description: A list of messages that carry the error details. There is a common set of message types for APIs to use. 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).' + Message: + type: object + properties: + message_id: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + text: + type: string + x-fern-encoding: + proto: + type: google.protobuf.StringValue + x-fern-type-name: Message + source: tests/bodymapping/message.proto tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi.yaml index 2f2973b1..3219d8fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -55,6 +55,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Kind: enum: - UNKNOWN_KIND @@ -71,21 +87,5 @@ components: $ref: '#/components/schemas/Kind' x-fern-type-name: Message source: tests/enumoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_default_response.yaml index 2f2973b1..3219d8fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_default_response.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -55,6 +55,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Kind: enum: - UNKNOWN_KIND @@ -71,21 +87,5 @@ components: $ref: '#/components/schemas/Kind' x-fern-type-name: Message source: tests/enumoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_flatten_oneofs.yaml index 2f2973b1..3219d8fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_flatten_oneofs.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -55,6 +55,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Kind: enum: - UNKNOWN_KIND @@ -71,21 +87,5 @@ components: $ref: '#/components/schemas/Kind' x-fern-type-name: Message source: tests/enumoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_fq_schema_naming.yaml index baf469a3..3a107150 100644 --- a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_fq_schema_naming.yaml @@ -41,6 +41,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage + x-fern-request-name: Message components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_json.yaml index a4c2057c..44b565c5 100644 --- a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_json.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -55,6 +55,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Kind: enum: - UNKNOWN_KIND @@ -71,21 +87,5 @@ components: $ref: '#/components/schemas/Kind' x-fern-type-name: Message source: tests/enumoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_string_enum.yaml index 2f2973b1..3219d8fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/enumoptions/openapi_string_enum.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -55,6 +55,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Kind: enum: - UNKNOWN_KIND @@ -71,21 +87,5 @@ components: $ref: '#/components/schemas/Kind' x-fern-type-name: Message source: tests/enumoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi.yaml index 28211c0b..09852544 100644 --- a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi.yaml @@ -46,7 +46,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -88,7 +88,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message2 @@ -105,6 +105,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -145,21 +161,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message2 source: tests/jsonoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_default_response.yaml index 28211c0b..09852544 100644 --- a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_default_response.yaml @@ -46,7 +46,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -88,7 +88,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message2 @@ -105,6 +105,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -145,21 +161,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message2 source: tests/jsonoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_flatten_oneofs.yaml index 28211c0b..09852544 100644 --- a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_flatten_oneofs.yaml @@ -46,7 +46,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -88,7 +88,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message2 @@ -105,6 +105,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -145,21 +161,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message2 source: tests/jsonoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_fq_schema_naming.yaml index 55ef1fc4..d37200d1 100644 --- a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_fq_schema_naming.yaml @@ -49,6 +49,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage + x-fern-request-name: Message patch: tags: - Messaging @@ -90,6 +91,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage + x-fern-request-name: Message2 components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_json.yaml index d9b67fbf..fe690db7 100644 --- a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_json.yaml @@ -46,7 +46,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -88,7 +88,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message2 @@ -105,6 +105,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -145,21 +161,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message2 source: tests/jsonoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_string_enum.yaml index 28211c0b..09852544 100644 --- a/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/jsonoptions/openapi_string_enum.yaml @@ -46,7 +46,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -88,7 +88,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message2 @@ -105,6 +105,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -145,21 +161,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message2 source: tests/jsonoptions/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi.yaml index 5848c143..a7cc65b2 100644 --- a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -71,6 +71,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -137,21 +153,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_SubMessage source: tests/mapfields/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_default_response.yaml index 5848c143..a7cc65b2 100644 --- a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_default_response.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -71,6 +71,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -137,21 +153,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_SubMessage source: tests/mapfields/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_flatten_oneofs.yaml index 5848c143..a7cc65b2 100644 --- a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_flatten_oneofs.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -71,6 +71,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -137,21 +153,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_SubMessage source: tests/mapfields/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_fq_schema_naming.yaml index e689655e..98158328 100644 --- a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_fq_schema_naming.yaml @@ -41,6 +41,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage + x-fern-request-name: Message components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_json.yaml index 90b281e9..efb63c71 100644 --- a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_json.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -71,6 +71,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -137,21 +153,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_SubMessage source: tests/mapfields/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_string_enum.yaml index 5848c143..a7cc65b2 100644 --- a/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/mapfields/openapi_string_enum.yaml @@ -38,7 +38,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage x-fern-request-name: Message @@ -71,6 +71,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -137,21 +153,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message_SubMessage source: tests/mapfields/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi.yaml index b9bbb04a..e6ae0b0e 100644 --- a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging1 x-fern-sdk-method-name: UpdateMessage components: @@ -51,6 +51,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -67,21 +83,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/noannotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging1 diff --git a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_default_response.yaml index b9bbb04a..e6ae0b0e 100644 --- a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_default_response.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging1 x-fern-sdk-method-name: UpdateMessage components: @@ -51,6 +51,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -67,21 +83,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/noannotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging1 diff --git a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_flatten_oneofs.yaml index b9bbb04a..e6ae0b0e 100644 --- a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_flatten_oneofs.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging1 x-fern-sdk-method-name: UpdateMessage components: @@ -51,6 +51,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -67,21 +83,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/noannotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging1 diff --git a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_json.yaml index 60126e98..99a3347c 100644 --- a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_json.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging1 x-fern-sdk-method-name: UpdateMessage components: @@ -51,6 +51,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -67,21 +83,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/noannotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging1 diff --git a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_string_enum.yaml index b9bbb04a..e6ae0b0e 100644 --- a/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/noannotations/openapi_string_enum.yaml @@ -35,7 +35,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging1 x-fern-sdk-method-name: UpdateMessage components: @@ -51,6 +51,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -67,21 +83,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/noannotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging1 diff --git a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi.yaml index 70d791e4..588bcdcf 100644 --- a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi.yaml @@ -30,7 +30,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: OneOfService x-fern-sdk-method-name: CreatePayment x-fern-request-name: OneOfMessage @@ -58,6 +58,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' OneOfMessage: type: object properties: @@ -105,21 +121,5 @@ components: description: Message demonstrating oneof field usage x-fern-type-name: OneOfMessage source: tests/oneof/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: OneOfService diff --git a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_default_response.yaml index 70d791e4..588bcdcf 100644 --- a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_default_response.yaml @@ -30,7 +30,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: OneOfService x-fern-sdk-method-name: CreatePayment x-fern-request-name: OneOfMessage @@ -58,6 +58,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' OneOfMessage: type: object properties: @@ -105,21 +121,5 @@ components: description: Message demonstrating oneof field usage x-fern-type-name: OneOfMessage source: tests/oneof/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: OneOfService diff --git a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_flatten_oneofs.yaml index 4def5561..b6788656 100644 --- a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_flatten_oneofs.yaml @@ -30,7 +30,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: OneOfService x-fern-sdk-method-name: CreatePayment x-fern-request-name: OneOfMessage @@ -52,6 +52,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' OneOfMessage: type: object properties: @@ -81,21 +97,5 @@ components: description: Message demonstrating oneof field usage x-fern-type-name: OneOfMessage source: tests/oneof/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: OneOfService diff --git a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_fq_schema_naming.yaml index 1a9afebf..dfd14f96 100644 --- a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_fq_schema_naming.yaml @@ -33,6 +33,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: OneOfService x-fern-sdk-method-name: CreatePayment + x-fern-request-name: OneOfMessage components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_json.yaml index 3d459c85..b75684bd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_json.yaml @@ -30,7 +30,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: OneOfService x-fern-sdk-method-name: CreatePayment x-fern-request-name: OneOfMessage @@ -58,6 +58,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' OneOfMessage: type: object properties: @@ -105,21 +121,5 @@ components: description: Message demonstrating oneof field usage x-fern-type-name: OneOfMessage source: tests/oneof/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: OneOfService diff --git a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_string_enum.yaml index 70d791e4..588bcdcf 100644 --- a/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/oneof/openapi_string_enum.yaml @@ -30,7 +30,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: OneOfService x-fern-sdk-method-name: CreatePayment x-fern-request-name: OneOfMessage @@ -58,6 +58,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' OneOfMessage: type: object properties: @@ -105,21 +121,5 @@ components: description: Message demonstrating oneof field usage x-fern-type-name: OneOfMessage source: tests/oneof/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: OneOfService diff --git a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi.yaml index 9cf3230d..36281dc0 100644 --- a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi.yaml @@ -43,7 +43,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' security: - BasicAuth: [] x-fern-sdk-group-name: Messaging1 @@ -61,6 +61,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: title: This is an overridden message schema title type: object @@ -80,22 +96,6 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/openapiv3annotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' securitySchemes: BasicAuth: type: http diff --git a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_default_response.yaml index 9cf3230d..36281dc0 100644 --- a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_default_response.yaml @@ -43,7 +43,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' security: - BasicAuth: [] x-fern-sdk-group-name: Messaging1 @@ -61,6 +61,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: title: This is an overridden message schema title type: object @@ -80,22 +96,6 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/openapiv3annotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' securitySchemes: BasicAuth: type: http diff --git a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_flatten_oneofs.yaml index 9cf3230d..36281dc0 100644 --- a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_flatten_oneofs.yaml @@ -43,7 +43,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' security: - BasicAuth: [] x-fern-sdk-group-name: Messaging1 @@ -61,6 +61,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: title: This is an overridden message schema title type: object @@ -80,22 +96,6 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/openapiv3annotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' securitySchemes: BasicAuth: type: http diff --git a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_json.yaml index 9cf3230d..36281dc0 100644 --- a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_json.yaml @@ -43,7 +43,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' security: - BasicAuth: [] x-fern-sdk-group-name: Messaging1 @@ -61,6 +61,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: title: This is an overridden message schema title type: object @@ -80,22 +96,6 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/openapiv3annotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' securitySchemes: BasicAuth: type: http diff --git a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_string_enum.yaml index 9cf3230d..36281dc0 100644 --- a/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/openapiv3annotations/openapi_string_enum.yaml @@ -43,7 +43,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' security: - BasicAuth: [] x-fern-sdk-group-name: Messaging1 @@ -61,6 +61,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: title: This is an overridden message schema title type: object @@ -80,22 +96,6 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/openapiv3annotations/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' securitySchemes: BasicAuth: type: http diff --git a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi.yaml index 78d12ce0..cadcd7ab 100644 --- a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi.yaml @@ -40,7 +40,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -74,7 +74,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -113,7 +113,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetUserMessage components: @@ -129,6 +129,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -155,21 +171,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/pathparams/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_default_response.yaml index 78d12ce0..cadcd7ab 100644 --- a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_default_response.yaml @@ -40,7 +40,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -74,7 +74,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -113,7 +113,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetUserMessage components: @@ -129,6 +129,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -155,21 +171,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/pathparams/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_flatten_oneofs.yaml index 78d12ce0..cadcd7ab 100644 --- a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_flatten_oneofs.yaml @@ -40,7 +40,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -74,7 +74,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -113,7 +113,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetUserMessage components: @@ -129,6 +129,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -155,21 +171,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/pathparams/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_fq_schema_naming.yaml index d784ce77..1fb16a55 100644 --- a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_fq_schema_naming.yaml @@ -77,6 +77,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage + x-fern-request-name: Message /v1/users/{user_id}/messages/{message_id}: get: tags: diff --git a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_json.yaml index f11f4db3..71f1fea4 100644 --- a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_json.yaml @@ -40,7 +40,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -74,7 +74,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -113,7 +113,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetUserMessage components: @@ -129,6 +129,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -155,21 +171,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/pathparams/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_string_enum.yaml index 78d12ce0..cadcd7ab 100644 --- a/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/pathparams/openapi_string_enum.yaml @@ -40,7 +40,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -74,7 +74,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage x-fern-request-name: Message @@ -113,7 +113,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetUserMessage components: @@ -129,6 +129,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Any + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -155,21 +171,5 @@ components: type: google.protobuf.StringValue x-fern-type-name: Message source: tests/pathparams/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' tags: - name: Messaging diff --git a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi.yaml index 00a6cd80..ffab2e62 100644 --- a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi.yaml @@ -25,7 +25,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessages x-fern-request-name: Empty @@ -233,7 +233,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage patch: @@ -485,7 +485,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage /v1/messages:csv: @@ -506,7 +506,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessagesCSV post: @@ -529,7 +529,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessagesFromCSV components: @@ -550,6 +550,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Value + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -712,22 +728,6 @@ components: $ref: '#/components/schemas/RecursiveChild' x-fern-type-name: RecursiveParent source: tests/protobuftypes/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' SubMessage: type: object properties: diff --git a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_default_response.yaml index 00a6cd80..ffab2e62 100644 --- a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_default_response.yaml @@ -25,7 +25,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessages x-fern-request-name: Empty @@ -233,7 +233,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage patch: @@ -485,7 +485,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage /v1/messages:csv: @@ -506,7 +506,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessagesCSV post: @@ -529,7 +529,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessagesFromCSV components: @@ -550,6 +550,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Value + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -712,22 +728,6 @@ components: $ref: '#/components/schemas/RecursiveChild' x-fern-type-name: RecursiveParent source: tests/protobuftypes/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' SubMessage: type: object properties: diff --git a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_flatten_oneofs.yaml index 00a6cd80..ffab2e62 100644 --- a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_flatten_oneofs.yaml @@ -25,7 +25,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessages x-fern-request-name: Empty @@ -233,7 +233,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage patch: @@ -485,7 +485,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage /v1/messages:csv: @@ -506,7 +506,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessagesCSV post: @@ -529,7 +529,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessagesFromCSV components: @@ -550,6 +550,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Value + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -712,22 +728,6 @@ components: $ref: '#/components/schemas/RecursiveChild' x-fern-type-name: RecursiveParent source: tests/protobuftypes/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' SubMessage: type: object properties: diff --git a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_fq_schema_naming.yaml index e1f3a9a8..4ba46ca3 100644 --- a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_fq_schema_naming.yaml @@ -28,6 +28,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessages + x-fern-request-name: Empty /v1/messages/{message_id}: get: tags: diff --git a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_json.yaml index 9d9bef65..1fe1c8dc 100644 --- a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_json.yaml @@ -25,7 +25,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessages x-fern-request-name: Empty @@ -233,7 +233,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage patch: @@ -485,7 +485,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage /v1/messages:csv: @@ -506,7 +506,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessagesCSV post: @@ -529,7 +529,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessagesFromCSV components: @@ -550,6 +550,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Value + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -712,22 +728,6 @@ components: $ref: '#/components/schemas/RecursiveChild' x-fern-type-name: RecursiveParent source: tests/protobuftypes/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' SubMessage: type: object properties: diff --git a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_string_enum.yaml index 00a6cd80..ffab2e62 100644 --- a/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi_string_enum.yaml @@ -25,7 +25,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessages x-fern-request-name: Empty @@ -233,7 +233,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: GetMessage post: @@ -267,7 +267,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessage patch: @@ -485,7 +485,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: UpdateMessage /v1/messages:csv: @@ -506,7 +506,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: ListMessagesCSV post: @@ -529,7 +529,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Messaging x-fern-sdk-method-name: CreateMessagesFromCSV components: @@ -550,6 +550,22 @@ components: x-fern-encoding: proto: type: google.protobuf.Value + GoogleRpcStatus: + type: object + properties: + code: + type: integer + description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. + format: int32 + message: + type: string + 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. + details: + type: array + items: + $ref: '#/components/schemas/GoogleProtobufAny' + description: A list of messages that carry the error details. There is a common set of message types for APIs to use. + 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).' Message: type: object properties: @@ -712,22 +728,6 @@ components: $ref: '#/components/schemas/RecursiveChild' x-fern-type-name: RecursiveParent source: tests/protobuftypes/message.proto - Status: - type: object - properties: - code: - type: integer - description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. - format: int32 - message: - type: string - 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. - details: - type: array - items: - $ref: '#/components/schemas/GoogleProtobufAny' - description: A list of messages that carry the error details. There is a common set of message types for APIs to use. - 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).' SubMessage: type: object properties: diff --git a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi.yaml b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi.yaml index 76d7ef4a..8edc9950 100644 --- a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi.yaml @@ -17,13 +17,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' default: description: Default error response content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Status x-fern-sdk-method-name: GetStatus x-fern-request-name: Empty @@ -40,7 +40,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Status: + GoogleRpcStatus: type: object properties: code: diff --git a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_default_response.yaml b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_default_response.yaml index 76d7ef4a..8edc9950 100644 --- a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_default_response.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_default_response.yaml @@ -17,13 +17,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' default: description: Default error response content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Status x-fern-sdk-method-name: GetStatus x-fern-request-name: Empty @@ -40,7 +40,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Status: + GoogleRpcStatus: type: object properties: code: diff --git a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_flatten_oneofs.yaml b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_flatten_oneofs.yaml index 76d7ef4a..8edc9950 100644 --- a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_flatten_oneofs.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_flatten_oneofs.yaml @@ -17,13 +17,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' default: description: Default error response content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Status x-fern-sdk-method-name: GetStatus x-fern-request-name: Empty @@ -40,7 +40,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Status: + GoogleRpcStatus: type: object properties: code: diff --git a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_fq_schema_naming.yaml b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_fq_schema_naming.yaml index cf63c120..fa35bd83 100644 --- a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_fq_schema_naming.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_fq_schema_naming.yaml @@ -26,6 +26,7 @@ paths: $ref: '#/components/schemas/google.rpc.Status' x-fern-sdk-group-name: Status x-fern-sdk-method-name: GetStatus + x-fern-request-name: Empty components: schemas: FieldBehavior: diff --git a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_json.yaml b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_json.yaml index 5914d07d..bf3636fd 100644 --- a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_json.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_json.yaml @@ -17,13 +17,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' default: description: Default error response content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Status x-fern-sdk-method-name: GetStatus x-fern-request-name: Empty @@ -40,7 +40,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Status: + GoogleRpcStatus: type: object properties: code: diff --git a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_string_enum.yaml b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_string_enum.yaml index 76d7ef4a..8edc9950 100644 --- a/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_string_enum.yaml +++ b/cmd/protoc-gen-openapi/examples/tests/rpctypes/openapi_string_enum.yaml @@ -17,13 +17,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' default: description: Default error response content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/GoogleRpcStatus' x-fern-sdk-group-name: Status x-fern-sdk-method-name: GetStatus x-fern-request-name: Empty @@ -40,7 +40,7 @@ components: x-fern-encoding: proto: type: google.protobuf.Any - Status: + GoogleRpcStatus: type: object properties: code: diff --git a/cmd/protoc-gen-openapi/generator/reflector.go b/cmd/protoc-gen-openapi/generator/reflector.go index 2adba330..13d3638a 100644 --- a/cmd/protoc-gen-openapi/generator/reflector.go +++ b/cmd/protoc-gen-openapi/generator/reflector.go @@ -28,6 +28,7 @@ import ( const ( protobufValueName = "GoogleProtobufValue" protobufAnyName = "GoogleProtobufAny" + rpcStatusName = "GoogleRpcStatus" ) type OpenAPIv3Reflector struct { @@ -65,6 +66,8 @@ func (r *OpenAPIv3Reflector) formatMessageName(message protoreflect.MessageDescr name = protobufValueName } else if typeName == ".google.protobuf.Any" { name = protobufAnyName + } else if typeName == ".google.rpc.Status" { + name = rpcStatusName } }