-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use auth annotations to render security schema in method section
- Loading branch information
1 parent
c809810
commit 97faffe
Showing
4 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# example v0.0.1 ebe5209e9238f02a045c540943d0298b747f5f03 | ||
# example v0.0.1 9e3db8dcce83f00fbc6c12b6a2b712b5fdd38874 | ||
# -- | ||
# Code generated by [email protected] with ../ generator; DO NOT EDIT | ||
# | ||
# 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 | ||
# 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, get an access key at https://sequence.build', 'name': 'X-Access-Key' }, 'ServiceAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests, get an access key at https://sequence.build', 'name': 'X-Access-Key' } } | ||
openapi: 3.0.0 | ||
info: | ||
title: 'Example webrpc API' | ||
|
@@ -11,6 +11,7 @@ servers: | |
- url: 'https://api.example.com' | ||
description: 'Production' | ||
components: | ||
securitySchemes: { 'ApiKeyAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests, get an access key at https://sequence.build', 'name': 'X-Access-Key' }, 'ServiceAuth': { 'type': 'apiKey', 'in': 'header', 'description': 'Project access key for authenticating requests, get an access key at https://sequence.build', 'name': 'X-Access-Key' } } | ||
schemas: | ||
ErrorWebrpcEndpoint: | ||
type: object | ||
|
@@ -537,6 +538,9 @@ paths: | |
/rpc/ExampleService/GetUserV2: | ||
post: | ||
summary: GetUserV2 | ||
security: | ||
- ApiKeyAuth: [] | ||
- ServiceAuth: [] | ||
requestBody: | ||
content: | ||
application/json: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters