Skip to content

Commit

Permalink
add new options to Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasJenicek committed Oct 8, 2024
1 parent 97faffe commit f118c2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ webrpc-gen -schema=./proto.ridl -target=github.com/webrpc/[email protected] -ou
## Set custom template variables
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"` |
| `-apiVersion` | `""` | `v22.10.25` |
| `-serverUrl` | `""` | `https://api.example.com` |
| `-serverDescription` | `""` | `"Staging API"` |
| `-servers` | `""` | `http://localhost:8080;description,http://localhost:8081;description` |
| webrpc-gen -option | Default value | Example value |
|------------------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| `-title` | `{Services[0].Name} API` | `"Example API"` |
| `-apiVersion` | `""` | `v22.10.25` |
| `-serverUrl` | `""` | `https://api.example.com` |
| `-serverDescription` | `""` | `"Staging API"` |
| `-servers` | `""` | `http://localhost:8080;description,http://localhost:8081;description` |
| `-securityAnnotation` | `""` | `@auth` |
| `-securitySchemes` | `""` | `{"ApiKeyAuth":{"type":"apiKey", "in":"header", "description":"Access key for authenticating requests", "name":"X-Access-Key"}}` |


Example:
- server url and server description will become part of the servers format in the end to keeep it backward compatible
Expand Down
2 changes: 1 addition & 1 deletion _examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ generate:
-securitySchemes="$$SECURITY_SCHEMES"

diff:
git diff --color --ignor1e-all-space --ignore-blank-lines --exit-code .
git diff --color --ignore-all-space --ignore-blank-lines --exit-code .

0 comments on commit f118c2c

Please sign in to comment.