Skip to content

Commit cbe1504

Browse files
authored
Merge pull request #8 from mach-composer/feat/allow-unused-fields
feat: allow unknown fields in api response
2 parents 3e1aa1a + f6e211b commit cbe1504

File tree

59 files changed

+1782
-578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1782
-578
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Added
2+
body: Allow unknown fields
3+
time: 2025-03-19T13:58:15.030244309+01:00

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
1414

1515
- API version: 0.1.0
1616
- Package version: 1.0.0
17+
- Generator version: 7.12.0
1718
- Build package: org.openapitools.codegen.languages.GoClientCodegen
1819
For more information, please visit [https://docs.machcomposer.io/](https://docs.machcomposer.io/)
1920

@@ -190,7 +191,7 @@ Authentication schemes defined for the API:
190191
- **API key parameter name**: sessionid
191192
- **Location**:
192193

193-
Note, each API key must be added to a map of `map[string]APIKey` where the key is: sessionid and passed in as the auth context for each request.
194+
Note, each API key must be added to a map of `map[string]APIKey` where the key is: cookieAuth and passed in as the auth context for each request.
194195

195196
Example
196197

@@ -199,7 +200,7 @@ auth := context.WithValue(
199200
context.Background(),
200201
mccsdk.ContextAPIKeys,
201202
map[string]mccsdk.APIKey{
202-
"sessionid": {Key: "API_KEY_STRING"},
203+
"cookieAuth": {Key: "API_KEY_STRING"},
203204
},
204205
)
205206
r, err := client.Service.Operation(auth, args)

Taskfile.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3'
33
tasks:
44
test:
55
cmds:
6-
- go test ./...
6+
- go test ./...
77

88
clean:
99
cmds:
@@ -15,7 +15,7 @@ tasks:
1515
generate:
1616
cmds:
1717
- rm -rf mccsdk docs
18-
- openapi-generator generate -i ../mach-composer-cloud/openapi.yaml -g go --enable-post-process-file --model-package mccsdk/mccmodels --http-user-agent mcc-sdk-go --additional-properties=apiNameSuffix=Api,packageName=mccsdk,generateInterfaces=true
18+
- openapi-generator-cli generate -i https://api.mach.cloud/docs/openapi.yaml -g go --enable-post-process-file -c ./openapi-config.yaml
1919
- mkdir mccsdk
2020
- mv *.go mccsdk
2121
- rm -rf test

0 commit comments

Comments
 (0)