webrpc-gen -schema=./proto.ridl -target=github.com/webrpc/[email protected] -out openapi.gen.yaml
Change any of the following default values by passing -option="Value"
CLI flag to webrpc-gen.
webrpc-gen -option | Default value | Example value |
---|---|---|
-title |
{Services[0].Name} API |
"Example API" |
-version |
"" |
v22.10.25 |
-serverUrl |
"" |
https://api.example.com |
-serverDescription |
"" |
"Staging API" |
Example:
webrpc-gen -schema=./proto.json -target=github.com/webrpc/[email protected] -out openapi.gen.yaml -title="Example webrpc API" -apiVersion="v22.11.8" -serverUrl=https://api.example.com -serverDescription="Production"
docker run -p 8088:8080 -v $(pwd):/tmp -e SWAGGER_JSON=/tmp/openapi.gen.yaml swaggerapi/swagger-ui
docker run -p 8088:8080 -v $(pwd):/tmp -e SWAGGER_FILE=/tmp/openapi.gen.yaml swaggerapi/swagger-editor