Skip to content

Commit

Permalink
Update dfirtrackapi to version 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
n3x77 committed Feb 2, 2022
1 parent 8aa0126 commit 79a5c52
Show file tree
Hide file tree
Showing 53 changed files with 3,118 additions and 2,595 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.1
5.4.0
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ OpenAPI 3 - Documentation of DFIRTrack API
## 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: v2.0.0
- Package version: 2.2.0
- API version: v2.4.1
- Package version: 2.4.1
- Build package: org.openapitools.codegen.languages.GoClientCodegen

## Installation
Expand All @@ -22,7 +22,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:

```golang
import sw "./dfirtrackapi"
import dfirtrackapi "github.com/dfirtrack/dfirtrackapi"
```

To use a proxy, set the environment variable `HTTP_PROXY`:
Expand All @@ -40,15 +40,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(), dfirtrackapi.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(), dfirtrackapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
Expand All @@ -62,10 +62,10 @@ 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{
ctx := context.WithValue(context.Background(), dfirtrackapi.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(), dfirtrackapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
Expand Down Expand Up @@ -298,7 +298,7 @@ r, err := client.Service.Operation(auth, args)
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
Loading

0 comments on commit 79a5c52

Please sign in to comment.