forked from loafle/openapi-generator-original
[BUG][GO] Replace references to sw package with {{packageName}} in README template (#16812)
* Replace references to sw package with {{packageName}}
* Update samples
This commit is contained in:
@@ -36,7 +36,7 @@ Default configuration comes with `Servers` field that contains server objects as
|
||||
|
||||
### Select Server Configuration
|
||||
|
||||
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
|
||||
For using other server than the one defined on index 0 set context value `openapi.ContextServerIndex` of type `int`.
|
||||
|
||||
```golang
|
||||
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
|
||||
@@ -44,7 +44,7 @@ ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
|
||||
|
||||
### Templated Server URL
|
||||
|
||||
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
|
||||
Templated server URL is formatted using default variables from configuration or from context value `openapi.ContextServerVariables` of type `map[string]string`.
|
||||
|
||||
```golang
|
||||
ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
|
||||
@@ -58,7 +58,7 @@ Note, enum values are always validated and all unused variables are silently ign
|
||||
|
||||
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
|
||||
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
|
||||
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
|
||||
Similar rules for overriding default operation server index and variables applies by using `openapi.ContextOperationServerIndices` and `openapi.ContextOperationServerVariables` context maps.
|
||||
|
||||
```golang
|
||||
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
|
||||
@@ -125,7 +125,7 @@ Authentication schemes defined for the API:
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
|
||||
auth := context.WithValue(context.Background(), openapi.ContextBasicAuth, openapi.BasicAuth{
|
||||
UserName: "username",
|
||||
Password: "password",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user