Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0
7.9.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openapitools/openapi-generator-cli:v7.0.0
FROM openapitools/openapi-generator-cli:v7.9.0

RUN apt-get update \
&& apt-get install -y --no-install-recommends jq golang \
Expand Down
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,30 @@ The API to the Cloudsmith Service
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 1.533.1
- Package version: 0.0.40
- API version: 1.536.1
- Package version: 0.0.41
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
For more information, please visit [https://help.cloudsmith.io](https://help.cloudsmith.io)

## Installation

Install the following dependencies:

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

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

```golang
```go
import cloudsmith "github.com/cloudsmith-io/cloudsmith-api-go"
```

To use a proxy, set the environment variable `HTTP_PROXY`:

```golang
```go
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```

Expand All @@ -37,17 +38,17 @@ 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 `cloudsmith.ContextServerIndex` of type `int`.

```golang
```go
ctx := context.WithValue(context.Background(), cloudsmith.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 `cloudsmith.ContextServerVariables` of type `map[string]string`.

```golang
```go
ctx := context.WithValue(context.Background(), cloudsmith.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Expand All @@ -59,9 +60,9 @@ 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 `cloudsmith.ContextOperationServerIndices` and `cloudsmith.ContextOperationServerVariables` context maps.

```golang
```go
ctx := context.WithValue(context.Background(), cloudsmith.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
Expand Down Expand Up @@ -618,16 +619,16 @@ Authentication schemes defined for the API:
- **API key parameter name**: X-Api-Key
- **Location**: HTTP header

Note, each API key must be added to a map of `map[string]APIKey` where the key is: X-Api-Key and passed in as the auth context for each request.
Note, each API key must be added to a map of `map[string]APIKey` where the key is: apikey and passed in as the auth context for each request.

Example

```golang
```go
auth := context.WithValue(
context.Background(),
sw.ContextAPIKeys,
map[string]sw.APIKey{
"X-Api-Key": {Key: "API_KEY_STRING"},
cloudsmith.ContextAPIKeys,
map[string]cloudsmith.APIKey{
"apikey": {Key: "API_KEY_STRING"},
},
)
r, err := client.Service.Operation(auth, args)
Expand All @@ -639,10 +640,10 @@ r, err := client.Service.Operation(auth, args)

Example

```golang
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
UserName: "username",
Password: "password",
```go
auth := context.WithValue(context.Background(), cloudsmith.ContextBasicAuth, cloudsmith.BasicAuth{
UserName: "username",
Password: "password",
})
r, err := client.Service.Operation(auth, args)
```
Expand Down
74 changes: 38 additions & 36 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ info:
url: https://opensource.org/licenses/MIT
termsOfService: https://help.cloudsmith.io
title: Cloudsmith API (v1)
version: 1.533.1
version: 1.536.1
servers:
- url: https://api.cloudsmith.io/v1
security:
Expand Down Expand Up @@ -12952,6 +12952,8 @@ paths:
components:
schemas:
ErrorDetail:
example:
detail: detail
properties:
detail:
description: An extended message for the response.
Expand Down Expand Up @@ -42688,7 +42690,7 @@ components:
StatusBasic:
example:
detail: Cloudsmith API is operational.
version: 1.533.1
version: 1.536.1
properties:
detail:
default: Cloudsmith API is operational.
Expand All @@ -42698,7 +42700,7 @@ components:
title: Detail
type: string
version:
default: 1.533.1
default: 1.536.1
description: The current version for the Cloudsmith service.
minLength: 1
readOnly: true
Expand Down Expand Up @@ -42931,9 +42933,9 @@ components:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
properties:
major:
title: Major
Expand Down Expand Up @@ -42974,16 +42976,16 @@ components:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
fixed_version:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
references:
- references
- references
Expand Down Expand Up @@ -43057,16 +43059,16 @@ components:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
fixed_version:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
references:
- references
- references
Expand All @@ -43080,16 +43082,16 @@ components:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
fixed_version:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
references:
- references
- references
Expand Down Expand Up @@ -43135,16 +43137,16 @@ components:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
fixed_version:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
references:
- references
- references
Expand All @@ -43158,16 +43160,16 @@ components:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
fixed_version:
patch: 5
major: 6
minor: 1
version: version
operator: operator
raw_version: raw_version
version: ""
operator: ""
raw_version: ""
references:
- references
- references
Expand Down
14 changes: 7 additions & 7 deletions api_audit_log.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading