|
1 | | -# example v0.0.1 9814b024890e4f9bf0fb6406686c29bcc402b24a |
| 1 | +# example v0.0.1 55eeccc8db95e08d65f0da63acfdcbd92cc1e6fa |
2 | 2 | # -- |
3 | 3 | # Code generated by webrpc-gen@v0.31.0 with ../ generator; DO NOT EDIT |
4 | 4 | # |
5 | | -# webrpc-gen -schema=./proto.ridl -target=../ -out=./openapi.gen.yaml -title=Example webrpc API -apiVersion=v22.11.8 -serverUrl=https://api.example.com -serverDescription=Production -securityAnnotation=@auth -securitySchemes={ 'ApiKeyAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests', 'name': 'X-Access-Key' }, 'ServiceAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests', 'name': 'X-Access-Key' } } |
6 | | -openapi: 3.2.0 |
| 5 | +# webrpc-gen -schema=./api.ridl -target=../ -out=./openapi.gen.yaml -title=Example webrpc API -apiVersion=v22.11.8 -serverUrl=https://api.example.com -serverDescription=Production -securityAnnotation=@auth -securitySchemes={ 'ApiKeyAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests', 'name': 'X-Access-Key' }, 'ServiceAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests', 'name': 'X-Access-Key' } } |
| 6 | +openapi: 3.0.0 |
7 | 7 | info: |
8 | 8 | title: 'Example webrpc API' |
9 | 9 | version: 'v22.11.8' |
@@ -411,6 +411,25 @@ components: |
411 | 411 | type: string |
412 | 412 | email: |
413 | 413 | type: string |
| 414 | + StreamNotificationsRequest: |
| 415 | + type: object |
| 416 | + StreamNotificationsResponse: |
| 417 | + type: object |
| 418 | + required: |
| 419 | + - notification |
| 420 | + properties: |
| 421 | + notification: |
| 422 | + $ref: '#/components/schemas/Notification' |
| 423 | + Notification: |
| 424 | + type: object |
| 425 | + required: |
| 426 | + - message |
| 427 | + - timestamp |
| 428 | + properties: |
| 429 | + message: |
| 430 | + type: string |
| 431 | + timestamp: |
| 432 | + type: string |
414 | 433 | ExampleService_Ping_Request: |
415 | 434 | type: object |
416 | 435 | ExampleService_GetUser_Request: |
@@ -444,6 +463,11 @@ components: |
444 | 463 | type: object |
445 | 464 | ExampleService_GetAllOptional_Request: |
446 | 465 | type: object |
| 466 | + ExampleService_StreamUserNotifications_Request: |
| 467 | + type: object |
| 468 | + properties: |
| 469 | + streamNotificationsRequest: |
| 470 | + $ref: '#/components/schemas/StreamNotificationsRequest' |
447 | 471 | ExampleService_Ping_Response: |
448 | 472 | type: object |
449 | 473 | ExampleService_GetUser_Response: |
@@ -487,6 +511,11 @@ components: |
487 | 511 | properties: |
488 | 512 | optional: |
489 | 513 | $ref: '#/components/schemas/Optional' |
| 514 | + ExampleService_StreamUserNotifications_Response: |
| 515 | + type: object |
| 516 | + properties: |
| 517 | + streamNotificationsResponse: |
| 518 | + $ref: '#/components/schemas/StreamNotificationsResponse' |
490 | 519 | AdminService_ListUsers_Request: |
491 | 520 | type: object |
492 | 521 | AdminService_ListUsers_Response: |
@@ -803,6 +832,50 @@ paths: |
803 | 832 | - $ref: '#/components/schemas/ErrorWebrpcServerPanic' |
804 | 833 | - $ref: '#/components/schemas/ErrorWebrpcInternalError' |
805 | 834 | - $ref: '#/components/schemas/ErrorDatabaseDown' |
| 835 | + /rpc/ExampleService/StreamUserNotifications: |
| 836 | + post: |
| 837 | + operationId: ExampleService-StreamUserNotifications |
| 838 | + tags: ["ExampleService"] |
| 839 | + summary: "" |
| 840 | + requestBody: |
| 841 | + content: |
| 842 | + application/json: |
| 843 | + schema: |
| 844 | + $ref: '#/components/schemas/ExampleService_StreamUserNotifications_Request' |
| 845 | + responses: |
| 846 | + '200': |
| 847 | + description: OK |
| 848 | + content: |
| 849 | + application/x-ndjson: |
| 850 | + schema: |
| 851 | + $ref: '#/components/schemas/ExampleService_StreamUserNotifications_Response' |
| 852 | + # OpenAPI 3.2.0 streaming (itemSchema) is not supported by 3.1.0 tooling: |
| 853 | + # itemSchema: |
| 854 | + # $ref: '#/components/schemas/ExampleService_StreamUserNotifications_Response' |
| 855 | + '4XX': |
| 856 | + description: Client error |
| 857 | + content: |
| 858 | + application/json: |
| 859 | + schema: |
| 860 | + oneOf: |
| 861 | + - $ref: '#/components/schemas/ErrorWebrpcEndpoint' |
| 862 | + - $ref: '#/components/schemas/ErrorWebrpcRequestFailed' |
| 863 | + - $ref: '#/components/schemas/ErrorWebrpcBadRoute' |
| 864 | + - $ref: '#/components/schemas/ErrorWebrpcBadMethod' |
| 865 | + - $ref: '#/components/schemas/ErrorWebrpcBadRequest' |
| 866 | + - $ref: '#/components/schemas/ErrorWebrpcClientAborted' |
| 867 | + - $ref: '#/components/schemas/ErrorWebrpcStreamLost' |
| 868 | + - $ref: '#/components/schemas/ErrorRateLimited' |
| 869 | + '5XX': |
| 870 | + description: Server error |
| 871 | + content: |
| 872 | + application/json: |
| 873 | + schema: |
| 874 | + oneOf: |
| 875 | + - $ref: '#/components/schemas/ErrorWebrpcBadResponse' |
| 876 | + - $ref: '#/components/schemas/ErrorWebrpcServerPanic' |
| 877 | + - $ref: '#/components/schemas/ErrorWebrpcInternalError' |
| 878 | + - $ref: '#/components/schemas/ErrorDatabaseDown' |
806 | 879 | /rpc/AdminService/ListUsers: |
807 | 880 | post: |
808 | 881 | operationId: AdminService-ListUsers |
|
0 commit comments