Skip to content

Commit 3afba5a

Browse files
authored
fix(openapi): Update google.rpc.Status schema name (#18)
1 parent d8fa0ff commit 3afba5a

77 files changed

Lines changed: 1156 additions & 1130 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ paths:
6262
content:
6363
application/json:
6464
schema:
65-
$ref: '#/components/schemas/Status'
65+
$ref: '#/components/schemas/GoogleRpcStatus'
6666
x-fern-sdk-group-name: LibraryService
6767
x-fern-sdk-method-name: ListShelves
6868
x-fern-request-name: ListShelvesRequest
@@ -89,7 +89,7 @@ paths:
8989
content:
9090
application/json:
9191
schema:
92-
$ref: '#/components/schemas/Status'
92+
$ref: '#/components/schemas/GoogleRpcStatus'
9393
x-fern-sdk-group-name: LibraryService
9494
x-fern-sdk-method-name: CreateShelf
9595
x-fern-request-name: CreateShelfRequest
@@ -118,7 +118,7 @@ paths:
118118
content:
119119
application/json:
120120
schema:
121-
$ref: '#/components/schemas/Status'
121+
$ref: '#/components/schemas/GoogleRpcStatus'
122122
x-fern-sdk-group-name: LibraryService
123123
x-fern-sdk-method-name: GetShelf
124124
x-fern-request-name: GetShelfRequest
@@ -143,7 +143,7 @@ paths:
143143
content:
144144
application/json:
145145
schema:
146-
$ref: '#/components/schemas/Status'
146+
$ref: '#/components/schemas/GoogleRpcStatus'
147147
x-fern-sdk-group-name: LibraryService
148148
x-fern-sdk-method-name: DeleteShelf
149149
x-fern-request-name: DeleteShelfRequest
@@ -198,7 +198,7 @@ paths:
198198
content:
199199
application/json:
200200
schema:
201-
$ref: '#/components/schemas/Status'
201+
$ref: '#/components/schemas/GoogleRpcStatus'
202202
x-fern-sdk-group-name: LibraryService
203203
x-fern-sdk-method-name: ListBooks
204204
x-fern-request-name: ListBooksRequest
@@ -232,7 +232,7 @@ paths:
232232
content:
233233
application/json:
234234
schema:
235-
$ref: '#/components/schemas/Status'
235+
$ref: '#/components/schemas/GoogleRpcStatus'
236236
x-fern-sdk-group-name: LibraryService
237237
x-fern-sdk-method-name: CreateBook
238238
x-fern-request-name: CreateBookRequest
@@ -267,7 +267,7 @@ paths:
267267
content:
268268
application/json:
269269
schema:
270-
$ref: '#/components/schemas/Status'
270+
$ref: '#/components/schemas/GoogleRpcStatus'
271271
x-fern-sdk-group-name: LibraryService
272272
x-fern-sdk-method-name: GetBook
273273
x-fern-request-name: GetBookRequest
@@ -317,7 +317,7 @@ paths:
317317
content:
318318
application/json:
319319
schema:
320-
$ref: '#/components/schemas/Status'
320+
$ref: '#/components/schemas/GoogleRpcStatus'
321321
x-fern-sdk-group-name: LibraryService
322322
x-fern-sdk-method-name: UpdateBook
323323
x-fern-request-name: UpdateBookRequest
@@ -348,7 +348,7 @@ paths:
348348
content:
349349
application/json:
350350
schema:
351-
$ref: '#/components/schemas/Status'
351+
$ref: '#/components/schemas/GoogleRpcStatus'
352352
x-fern-sdk-group-name: LibraryService
353353
x-fern-sdk-method-name: DeleteBook
354354
x-fern-request-name: DeleteBookRequest
@@ -391,7 +391,7 @@ paths:
391391
content:
392392
application/json:
393393
schema:
394-
$ref: '#/components/schemas/Status'
394+
$ref: '#/components/schemas/GoogleRpcStatus'
395395
x-fern-sdk-group-name: LibraryService
396396
x-fern-sdk-method-name: MoveBook
397397
x-fern-request-name: MoveBookRequest
@@ -433,7 +433,7 @@ paths:
433433
content:
434434
application/json:
435435
schema:
436-
$ref: '#/components/schemas/Status'
436+
$ref: '#/components/schemas/GoogleRpcStatus'
437437
x-fern-sdk-group-name: LibraryService
438438
x-fern-sdk-method-name: MergeShelves
439439
x-fern-request-name: MergeShelvesRequest
@@ -515,6 +515,22 @@ components:
515515
x-fern-encoding:
516516
proto:
517517
type: google.protobuf.Any
518+
GoogleRpcStatus:
519+
type: object
520+
properties:
521+
code:
522+
type: integer
523+
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
524+
format: int32
525+
message:
526+
type: string
527+
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.
528+
details:
529+
type: array
530+
items:
531+
$ref: '#/components/schemas/GoogleProtobufAny'
532+
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
533+
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).'
518534
ListBooksResponse:
519535
type: object
520536
properties:
@@ -643,21 +659,5 @@ components:
643659
description: A Shelf contains a collection of books with a theme.
644660
x-fern-type-name: Shelf
645661
source: google/example/library/v1/library.proto
646-
Status:
647-
type: object
648-
properties:
649-
code:
650-
type: integer
651-
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
652-
format: int32
653-
message:
654-
type: string
655-
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.
656-
details:
657-
type: array
658-
items:
659-
$ref: '#/components/schemas/GoogleProtobufAny'
660-
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
661-
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).'
662662
tags:
663663
- name: LibraryService

cmd/protoc-gen-openapi/examples/google/example/library/v1/openapi_default_response.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ paths:
6262
content:
6363
application/json:
6464
schema:
65-
$ref: '#/components/schemas/Status'
65+
$ref: '#/components/schemas/GoogleRpcStatus'
6666
x-fern-sdk-group-name: LibraryService
6767
x-fern-sdk-method-name: ListShelves
6868
x-fern-request-name: ListShelvesRequest
@@ -89,7 +89,7 @@ paths:
8989
content:
9090
application/json:
9191
schema:
92-
$ref: '#/components/schemas/Status'
92+
$ref: '#/components/schemas/GoogleRpcStatus'
9393
x-fern-sdk-group-name: LibraryService
9494
x-fern-sdk-method-name: CreateShelf
9595
x-fern-request-name: CreateShelfRequest
@@ -118,7 +118,7 @@ paths:
118118
content:
119119
application/json:
120120
schema:
121-
$ref: '#/components/schemas/Status'
121+
$ref: '#/components/schemas/GoogleRpcStatus'
122122
x-fern-sdk-group-name: LibraryService
123123
x-fern-sdk-method-name: GetShelf
124124
x-fern-request-name: GetShelfRequest
@@ -143,7 +143,7 @@ paths:
143143
content:
144144
application/json:
145145
schema:
146-
$ref: '#/components/schemas/Status'
146+
$ref: '#/components/schemas/GoogleRpcStatus'
147147
x-fern-sdk-group-name: LibraryService
148148
x-fern-sdk-method-name: DeleteShelf
149149
x-fern-request-name: DeleteShelfRequest
@@ -198,7 +198,7 @@ paths:
198198
content:
199199
application/json:
200200
schema:
201-
$ref: '#/components/schemas/Status'
201+
$ref: '#/components/schemas/GoogleRpcStatus'
202202
x-fern-sdk-group-name: LibraryService
203203
x-fern-sdk-method-name: ListBooks
204204
x-fern-request-name: ListBooksRequest
@@ -232,7 +232,7 @@ paths:
232232
content:
233233
application/json:
234234
schema:
235-
$ref: '#/components/schemas/Status'
235+
$ref: '#/components/schemas/GoogleRpcStatus'
236236
x-fern-sdk-group-name: LibraryService
237237
x-fern-sdk-method-name: CreateBook
238238
x-fern-request-name: CreateBookRequest
@@ -267,7 +267,7 @@ paths:
267267
content:
268268
application/json:
269269
schema:
270-
$ref: '#/components/schemas/Status'
270+
$ref: '#/components/schemas/GoogleRpcStatus'
271271
x-fern-sdk-group-name: LibraryService
272272
x-fern-sdk-method-name: GetBook
273273
x-fern-request-name: GetBookRequest
@@ -317,7 +317,7 @@ paths:
317317
content:
318318
application/json:
319319
schema:
320-
$ref: '#/components/schemas/Status'
320+
$ref: '#/components/schemas/GoogleRpcStatus'
321321
x-fern-sdk-group-name: LibraryService
322322
x-fern-sdk-method-name: UpdateBook
323323
x-fern-request-name: UpdateBookRequest
@@ -348,7 +348,7 @@ paths:
348348
content:
349349
application/json:
350350
schema:
351-
$ref: '#/components/schemas/Status'
351+
$ref: '#/components/schemas/GoogleRpcStatus'
352352
x-fern-sdk-group-name: LibraryService
353353
x-fern-sdk-method-name: DeleteBook
354354
x-fern-request-name: DeleteBookRequest
@@ -391,7 +391,7 @@ paths:
391391
content:
392392
application/json:
393393
schema:
394-
$ref: '#/components/schemas/Status'
394+
$ref: '#/components/schemas/GoogleRpcStatus'
395395
x-fern-sdk-group-name: LibraryService
396396
x-fern-sdk-method-name: MoveBook
397397
x-fern-request-name: MoveBookRequest
@@ -433,7 +433,7 @@ paths:
433433
content:
434434
application/json:
435435
schema:
436-
$ref: '#/components/schemas/Status'
436+
$ref: '#/components/schemas/GoogleRpcStatus'
437437
x-fern-sdk-group-name: LibraryService
438438
x-fern-sdk-method-name: MergeShelves
439439
x-fern-request-name: MergeShelvesRequest
@@ -515,6 +515,22 @@ components:
515515
x-fern-encoding:
516516
proto:
517517
type: google.protobuf.Any
518+
GoogleRpcStatus:
519+
type: object
520+
properties:
521+
code:
522+
type: integer
523+
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
524+
format: int32
525+
message:
526+
type: string
527+
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.
528+
details:
529+
type: array
530+
items:
531+
$ref: '#/components/schemas/GoogleProtobufAny'
532+
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
533+
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).'
518534
ListBooksResponse:
519535
type: object
520536
properties:
@@ -643,21 +659,5 @@ components:
643659
description: A Shelf contains a collection of books with a theme.
644660
x-fern-type-name: Shelf
645661
source: google/example/library/v1/library.proto
646-
Status:
647-
type: object
648-
properties:
649-
code:
650-
type: integer
651-
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
652-
format: int32
653-
message:
654-
type: string
655-
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.
656-
details:
657-
type: array
658-
items:
659-
$ref: '#/components/schemas/GoogleProtobufAny'
660-
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
661-
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).'
662662
tags:
663663
- name: LibraryService

0 commit comments

Comments
 (0)