Skip to content

Commit

Permalink
Generates modules from pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
pipeline-anypoint-clients-generator committed Jan 17, 2024
1 parent 430e781 commit 79d8cf7
Show file tree
Hide file tree
Showing 985 changed files with 98,001 additions and 14,764 deletions.
5 changes: 3 additions & 2 deletions ame/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ configuration.go
docs/DefaultApi.md
docs/Exchange.md
docs/ExchangeBody.md
docs/InlineResponse404.md
docs/UpdateAME404Response.md
git_push.sh
go.mod
go.sum
model_exchange.go
model_exchange_body.go
model_inline_response_404.go
model_update_ame_404_response.go
response.go
test/api_default_test.go
utils.go
2 changes: 1 addition & 1 deletion ame/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0
6.6.0
21 changes: 10 additions & 11 deletions ame/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ Install the following dependencies:

```shell
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
```

Put the package under your project folder and add the following in import:

```golang
import sw "./ame"
import ame "github.com/mulesoft-anypoint/anypoint-client-go/ame"
```

To use a proxy, set the environment variable `HTTP_PROXY`:
Expand All @@ -40,15 +39,15 @@ Default configuration comes with `Servers` field that contains server objects as
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.

```golang
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
ctx := context.WithValue(context.Background(), ame.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`.

```golang
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
ctx := context.WithValue(context.Background(), ame.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
Expand All @@ -58,14 +57,14 @@ Note, enum values are always validated and all unused variables are silently ign
### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identifield by `"{classname}Service.{nickname}"` string.
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.

```
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
```golang
ctx := context.WithValue(context.Background(), ame.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
ctx = context.WithValue(context.Background(), ame.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
Expand All @@ -88,21 +87,21 @@ Class | Method | HTTP request | Description

- [Exchange](docs/Exchange.md)
- [ExchangeBody](docs/ExchangeBody.md)
- [InlineResponse404](docs/InlineResponse404.md)
- [UpdateAME404Response](docs/UpdateAME404Response.md)


## Documentation For Authorization



Authentication schemes defined for the API:
### bearerAuth

- **Type**: HTTP Bearer token authentication

Example

```golang
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
```

Expand Down
6 changes: 3 additions & 3 deletions ame/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/inline_response_404'
$ref: '#/components/schemas/UpdateAME_404_response'
description: Exchange not found
"200":
content:
Expand Down Expand Up @@ -229,7 +229,7 @@ components:
content:
application/json:
schema:
$ref: '#/components/schemas/inline_response_404'
$ref: '#/components/schemas/UpdateAME_404_response'
description: Exchange not found
SuccessGetExchange:
content:
Expand Down Expand Up @@ -276,7 +276,7 @@ components:
type: boolean
title: exchange
type: object
inline_response_404:
UpdateAME_404_response:
properties:
status:
default: 404
Expand Down
Loading

0 comments on commit 79d8cf7

Please sign in to comment.