@kattebak/openapi-generator-ts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +189 -0
- package/dist/cli/commands/generate.d.ts +23 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +116 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/list.d.ts +2 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +26 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +6 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +80 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/convert-template.d.ts +31 -0
- package/dist/cli/convert-template.d.ts.map +1 -0
- package/dist/cli/convert-template.js +204 -0
- package/dist/cli/convert-template.js.map +1 -0
- package/dist/cli/convert-template.test.d.ts +2 -0
- package/dist/cli/convert-template.test.d.ts.map +1 -0
- package/dist/cli/convert-template.test.js +74 -0
- package/dist/cli/convert-template.test.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +246 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/config.d.ts +252 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +31 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/generator.d.ts +99 -0
- package/dist/core/generator.d.ts.map +1 -0
- package/dist/core/generator.js +492 -0
- package/dist/core/generator.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/types.d.ts +47 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +5 -0
- package/dist/core/types.js.map +1 -0
- package/dist/generators/generators.test.d.ts +6 -0
- package/dist/generators/generators.test.d.ts.map +1 -0
- package/dist/generators/generators.test.js +247 -0
- package/dist/generators/generators.test.js.map +1 -0
- package/dist/generators/go.d.ts +10 -0
- package/dist/generators/go.d.ts.map +1 -0
- package/dist/generators/go.js +327 -0
- package/dist/generators/go.js.map +1 -0
- package/dist/generators/index.d.ts +29 -0
- package/dist/generators/index.d.ts.map +1 -0
- package/dist/generators/index.js +58 -0
- package/dist/generators/index.js.map +1 -0
- package/dist/generators/php.d.ts +14 -0
- package/dist/generators/php.d.ts.map +1 -0
- package/dist/generators/php.js +241 -0
- package/dist/generators/php.js.map +1 -0
- package/dist/generators/python.d.ts +10 -0
- package/dist/generators/python.d.ts.map +1 -0
- package/dist/generators/python.js +273 -0
- package/dist/generators/python.js.map +1 -0
- package/dist/generators/typescript-fetch.d.ts +14 -0
- package/dist/generators/typescript-fetch.d.ts.map +1 -0
- package/dist/generators/typescript-fetch.js +217 -0
- package/dist/generators/typescript-fetch.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/models/codegen-model.d.ts +123 -0
- package/dist/models/codegen-model.d.ts.map +1 -0
- package/dist/models/codegen-model.js +64 -0
- package/dist/models/codegen-model.js.map +1 -0
- package/dist/models/codegen-model.test.d.ts +6 -0
- package/dist/models/codegen-model.test.d.ts.map +1 -0
- package/dist/models/codegen-model.test.js +143 -0
- package/dist/models/codegen-model.test.js.map +1 -0
- package/dist/models/codegen-operation.d.ts +95 -0
- package/dist/models/codegen-operation.d.ts.map +1 -0
- package/dist/models/codegen-operation.js +54 -0
- package/dist/models/codegen-operation.js.map +1 -0
- package/dist/models/codegen-parameter.d.ts +86 -0
- package/dist/models/codegen-parameter.d.ts.map +1 -0
- package/dist/models/codegen-parameter.js +47 -0
- package/dist/models/codegen-parameter.js.map +1 -0
- package/dist/models/codegen-property.d.ts +95 -0
- package/dist/models/codegen-property.d.ts.map +1 -0
- package/dist/models/codegen-property.js +47 -0
- package/dist/models/codegen-property.js.map +1 -0
- package/dist/models/codegen-response.d.ts +64 -0
- package/dist/models/codegen-response.d.ts.map +1 -0
- package/dist/models/codegen-response.js +42 -0
- package/dist/models/codegen-response.js.map +1 -0
- package/dist/models/codegen-security.d.ts +34 -0
- package/dist/models/codegen-security.d.ts.map +1 -0
- package/dist/models/codegen-security.js +18 -0
- package/dist/models/codegen-security.js.map +1 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +7 -0
- package/dist/models/index.js.map +1 -0
- package/dist/parser/index.d.ts +4 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +4 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/openapi-parser.d.ts +71 -0
- package/dist/parser/openapi-parser.d.ts.map +1 -0
- package/dist/parser/openapi-parser.js +195 -0
- package/dist/parser/openapi-parser.js.map +1 -0
- package/dist/parser/openapi-parser.test.d.ts +6 -0
- package/dist/parser/openapi-parser.test.d.ts.map +1 -0
- package/dist/parser/openapi-parser.test.js +238 -0
- package/dist/parser/openapi-parser.test.js.map +1 -0
- package/dist/parser/operation-transformer.d.ts +95 -0
- package/dist/parser/operation-transformer.d.ts.map +1 -0
- package/dist/parser/operation-transformer.js +634 -0
- package/dist/parser/operation-transformer.js.map +1 -0
- package/dist/parser/schema-transformer.d.ts +134 -0
- package/dist/parser/schema-transformer.d.ts.map +1 -0
- package/dist/parser/schema-transformer.js +557 -0
- package/dist/parser/schema-transformer.js.map +1 -0
- package/dist/template/engine-adapter.d.ts +55 -0
- package/dist/template/engine-adapter.d.ts.map +1 -0
- package/dist/template/engine-adapter.js +178 -0
- package/dist/template/engine-adapter.js.map +1 -0
- package/dist/template/engine-adapter.test.d.ts +6 -0
- package/dist/template/engine-adapter.test.d.ts.map +1 -0
- package/dist/template/engine-adapter.test.js +186 -0
- package/dist/template/engine-adapter.test.js.map +1 -0
- package/dist/template/index.d.ts +5 -0
- package/dist/template/index.d.ts.map +1 -0
- package/dist/template/index.js +5 -0
- package/dist/template/index.js.map +1 -0
- package/dist/template/lambdas/indent-lambdas.d.ts +40 -0
- package/dist/template/lambdas/indent-lambdas.d.ts.map +1 -0
- package/dist/template/lambdas/indent-lambdas.js +98 -0
- package/dist/template/lambdas/indent-lambdas.js.map +1 -0
- package/dist/template/lambdas/index.d.ts +44 -0
- package/dist/template/lambdas/index.d.ts.map +1 -0
- package/dist/template/lambdas/index.js +79 -0
- package/dist/template/lambdas/index.js.map +1 -0
- package/dist/template/lambdas/string-lambdas.d.ts +78 -0
- package/dist/template/lambdas/string-lambdas.d.ts.map +1 -0
- package/dist/template/lambdas/string-lambdas.js +148 -0
- package/dist/template/lambdas/string-lambdas.js.map +1 -0
- package/dist/template/lambdas/string-lambdas.test.d.ts +6 -0
- package/dist/template/lambdas/string-lambdas.test.d.ts.map +1 -0
- package/dist/template/lambdas/string-lambdas.test.js +158 -0
- package/dist/template/lambdas/string-lambdas.test.js.map +1 -0
- package/dist/template/template-locator.d.ts +72 -0
- package/dist/template/template-locator.d.ts.map +1 -0
- package/dist/template/template-locator.js +173 -0
- package/dist/template/template-locator.js.map +1 -0
- package/dist/template/template-manager.d.ts +65 -0
- package/dist/template/template-manager.d.ts.map +1 -0
- package/dist/template/template-manager.js +185 -0
- package/dist/template/template-manager.js.map +1 -0
- package/package.json +67 -0
- package/templates/go/.travis.yml +8 -0
- package/templates/go/README.mustache +236 -0
- package/templates/go/api.mustache +452 -0
- package/templates/go/api_doc.mustache +92 -0
- package/templates/go/api_test.mustache +59 -0
- package/templates/go/client.mustache +761 -0
- package/templates/go/configuration.mustache +332 -0
- package/templates/go/git_push.sh.mustache +57 -0
- package/templates/go/gitignore.mustache +24 -0
- package/templates/go/go.mod.mustache +16 -0
- package/templates/go/go.sum.mustache +19 -0
- package/templates/go/model.mustache +21 -0
- package/templates/go/model_anyof.mustache +93 -0
- package/templates/go/model_doc.mustache +97 -0
- package/templates/go/model_enum.mustache +101 -0
- package/templates/go/model_oneof.mustache +160 -0
- package/templates/go/model_simple.mustache +572 -0
- package/templates/go/nullable_model.mustache +35 -0
- package/templates/go/openapi.mustache +1 -0
- package/templates/go/partial_header.mustache +18 -0
- package/templates/go/response.mustache +38 -0
- package/templates/go/signing.mustache +453 -0
- package/templates/go/utils.mustache +352 -0
- package/templates/php/.php-cs-fixer.dist.php +29 -0
- package/templates/php/.travis.yml +8 -0
- package/templates/php/ApiException.mustache +111 -0
- package/templates/php/Configuration.mustache +606 -0
- package/templates/php/FormDataProcessor.mustache +238 -0
- package/templates/php/HeaderSelector.mustache +265 -0
- package/templates/php/ModelInterface.mustache +103 -0
- package/templates/php/ObjectSerializer.mustache +591 -0
- package/templates/php/README.mustache +151 -0
- package/templates/php/api.mustache +891 -0
- package/templates/php/api_doc.mustache +105 -0
- package/templates/php/api_test.mustache +80 -0
- package/templates/php/composer.mustache +44 -0
- package/templates/php/git_push.sh.mustache +57 -0
- package/templates/php/gitignore +15 -0
- package/templates/php/libraries/psr-18/ApiException.mustache +114 -0
- package/templates/php/libraries/psr-18/DebugPlugin.mustache +93 -0
- package/templates/php/libraries/psr-18/README.mustache +161 -0
- package/templates/php/libraries/psr-18/api.mustache +833 -0
- package/templates/php/libraries/psr-18/api_doc.mustache +79 -0
- package/templates/php/libraries/psr-18/composer.mustache +56 -0
- package/templates/php/model.mustache +47 -0
- package/templates/php/model_doc.mustache +10 -0
- package/templates/php/model_enum.mustache +33 -0
- package/templates/php/model_generic.mustache +565 -0
- package/templates/php/model_test.mustache +88 -0
- package/templates/php/partial_header.mustache +18 -0
- package/templates/php/php_doc_auth_partial.mustache +23 -0
- package/templates/php/phpunit.xml.mustache +18 -0
- package/templates/python/README.mustache +60 -0
- package/templates/python/README_onlypackage.mustache +50 -0
- package/templates/python/__init__.mustache +1 -0
- package/templates/python/__init__api.mustache +19 -0
- package/templates/python/__init__model.mustache +22 -0
- package/templates/python/__init__package.mustache +49 -0
- package/templates/python/api.mustache +244 -0
- package/templates/python/api_client.mustache +822 -0
- package/templates/python/api_doc.mustache +81 -0
- package/templates/python/api_doc_example.mustache +38 -0
- package/templates/python/api_response.mustache +21 -0
- package/templates/python/api_test.mustache +48 -0
- package/templates/python/asyncio/rest.mustache +209 -0
- package/templates/python/common_README.mustache +85 -0
- package/templates/python/configuration.mustache +806 -0
- package/templates/python/exceptions.mustache +210 -0
- package/templates/python/exports_api.mustache +3 -0
- package/templates/python/exports_model.mustache +3 -0
- package/templates/python/exports_package.mustache +20 -0
- package/templates/python/git_push.sh.mustache +57 -0
- package/templates/python/github-workflow.mustache +35 -0
- package/templates/python/gitignore.mustache +66 -0
- package/templates/python/gitlab-ci.mustache +31 -0
- package/templates/python/httpx/rest.mustache +190 -0
- package/templates/python/model.mustache +16 -0
- package/templates/python/model_anyof.mustache +182 -0
- package/templates/python/model_doc.mustache +40 -0
- package/templates/python/model_enum.mustache +36 -0
- package/templates/python/model_generic.mustache +403 -0
- package/templates/python/model_oneof.mustache +209 -0
- package/templates/python/model_test.mustache +60 -0
- package/templates/python/partial_api.mustache +52 -0
- package/templates/python/partial_api_args.mustache +18 -0
- package/templates/python/partial_header.mustache +19 -0
- package/templates/python/py.typed.mustache +1 -0
- package/templates/python/pyproject.mustache +172 -0
- package/templates/python/python_doc_auth_partial.mustache +108 -0
- package/templates/python/requirements.mustache +23 -0
- package/templates/python/rest.mustache +254 -0
- package/templates/python/setup.mustache +60 -0
- package/templates/python/setup_cfg.mustache +2 -0
- package/templates/python/signing.mustache +422 -0
- package/templates/python/test-requirements.mustache +6 -0
- package/templates/python/tornado/rest.mustache +148 -0
- package/templates/python/tox.mustache +9 -0
- package/templates/python/travis.mustache +17 -0
- package/templates/typescript-fetch/ApiEntitiesRecord.mustache +26 -0
- package/templates/typescript-fetch/ApiEntitiesReducer.mustache +21 -0
- package/templates/typescript-fetch/ApiEntitiesSelectors.mustache +5 -0
- package/templates/typescript-fetch/README.mustache +127 -0
- package/templates/typescript-fetch/allSagas.mustache +19 -0
- package/templates/typescript-fetch/api_doc.mustache +63 -0
- package/templates/typescript-fetch/api_example.mustache +44 -0
- package/templates/typescript-fetch/apis.index.mustache +16 -0
- package/templates/typescript-fetch/apis.mustache +483 -0
- package/templates/typescript-fetch/apisAssignQueryParam.mustache +12 -0
- package/templates/typescript-fetch/gitignore +4 -0
- package/templates/typescript-fetch/index.mustache +17 -0
- package/templates/typescript-fetch/licenseInfo.mustache +11 -0
- package/templates/typescript-fetch/modelEnum.mustache +28 -0
- package/templates/typescript-fetch/modelEnumInterfaces.mustache +37 -0
- package/templates/typescript-fetch/modelGeneric.mustache +261 -0
- package/templates/typescript-fetch/modelGenericInterfaces.mustache +50 -0
- package/templates/typescript-fetch/modelOneOf.mustache +255 -0
- package/templates/typescript-fetch/modelOneOfInterfaces.mustache +6 -0
- package/templates/typescript-fetch/model_doc.mustache +41 -0
- package/templates/typescript-fetch/models.index.mustache +32 -0
- package/templates/typescript-fetch/models.mustache +24 -0
- package/templates/typescript-fetch/npmignore.mustache +1 -0
- package/templates/typescript-fetch/package.mustache +43 -0
- package/templates/typescript-fetch/recordGeneric.mustache +295 -0
- package/templates/typescript-fetch/records.mustache +17 -0
- package/templates/typescript-fetch/runtime.mustache +424 -0
- package/templates/typescript-fetch/runtimeSagasAndRecords.mustache +120 -0
- package/templates/typescript-fetch/sagaApiManager.mustache +28 -0
- package/templates/typescript-fetch/sagas.mustache +245 -0
- package/templates/typescript-fetch/sourceLibraryIndex.mustache +1 -0
- package/templates/typescript-fetch/tsconfig.esm.mustache +7 -0
- package/templates/typescript-fetch/tsconfig.mustache +25 -0
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
{{>partial_header}}
|
|
2
|
+
package {{packageName}}
|
|
3
|
+
|
|
4
|
+
import (
|
|
5
|
+
"bytes"
|
|
6
|
+
"encoding/json"
|
|
7
|
+
"fmt"
|
|
8
|
+
"reflect"
|
|
9
|
+
"time"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
// PtrBool is a helper routine that returns a pointer to given boolean value.
|
|
13
|
+
func PtrBool(v bool) *bool { return &v }
|
|
14
|
+
|
|
15
|
+
// PtrInt is a helper routine that returns a pointer to given integer value.
|
|
16
|
+
func PtrInt(v int) *int { return &v }
|
|
17
|
+
|
|
18
|
+
// PtrInt32 is a helper routine that returns a pointer to given integer value.
|
|
19
|
+
func PtrInt32(v int32) *int32 { return &v }
|
|
20
|
+
|
|
21
|
+
// PtrInt64 is a helper routine that returns a pointer to given integer value.
|
|
22
|
+
func PtrInt64(v int64) *int64 { return &v }
|
|
23
|
+
|
|
24
|
+
// PtrFloat32 is a helper routine that returns a pointer to given float value.
|
|
25
|
+
func PtrFloat32(v float32) *float32 { return &v }
|
|
26
|
+
|
|
27
|
+
// PtrFloat64 is a helper routine that returns a pointer to given float value.
|
|
28
|
+
func PtrFloat64(v float64) *float64 { return &v }
|
|
29
|
+
|
|
30
|
+
// PtrString is a helper routine that returns a pointer to given string value.
|
|
31
|
+
func PtrString(v string) *string { return &v }
|
|
32
|
+
|
|
33
|
+
// PtrTime is helper routine that returns a pointer to given Time value.
|
|
34
|
+
func PtrTime(v time.Time) *time.Time { return &v }
|
|
35
|
+
|
|
36
|
+
type NullableBool struct {
|
|
37
|
+
value *bool
|
|
38
|
+
isSet bool
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
func (v NullableBool) Get() *bool {
|
|
42
|
+
return v.value
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
func (v *NullableBool) Set(val *bool) {
|
|
46
|
+
v.value = val
|
|
47
|
+
v.isSet = true
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
func (v NullableBool) IsSet() bool {
|
|
51
|
+
return v.isSet
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
func (v *NullableBool) Unset() {
|
|
55
|
+
v.value = nil
|
|
56
|
+
v.isSet = false
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
func NewNullableBool(val *bool) *NullableBool {
|
|
60
|
+
return &NullableBool{value: val, isSet: true}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
func (v NullableBool) MarshalJSON() ([]byte, error) {
|
|
64
|
+
return json.Marshal(v.value)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
func (v *NullableBool) UnmarshalJSON(src []byte) error {
|
|
68
|
+
v.isSet = true
|
|
69
|
+
return json.Unmarshal(src, &v.value)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
type NullableInt struct {
|
|
73
|
+
value *int
|
|
74
|
+
isSet bool
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
func (v NullableInt) Get() *int {
|
|
78
|
+
return v.value
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
func (v *NullableInt) Set(val *int) {
|
|
82
|
+
v.value = val
|
|
83
|
+
v.isSet = true
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
func (v NullableInt) IsSet() bool {
|
|
87
|
+
return v.isSet
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
func (v *NullableInt) Unset() {
|
|
91
|
+
v.value = nil
|
|
92
|
+
v.isSet = false
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
func NewNullableInt(val *int) *NullableInt {
|
|
96
|
+
return &NullableInt{value: val, isSet: true}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
func (v NullableInt) MarshalJSON() ([]byte, error) {
|
|
100
|
+
return json.Marshal(v.value)
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
func (v *NullableInt) UnmarshalJSON(src []byte) error {
|
|
104
|
+
v.isSet = true
|
|
105
|
+
return json.Unmarshal(src, &v.value)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
type NullableInt32 struct {
|
|
109
|
+
value *int32
|
|
110
|
+
isSet bool
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
func (v NullableInt32) Get() *int32 {
|
|
114
|
+
return v.value
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
func (v *NullableInt32) Set(val *int32) {
|
|
118
|
+
v.value = val
|
|
119
|
+
v.isSet = true
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
func (v NullableInt32) IsSet() bool {
|
|
123
|
+
return v.isSet
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
func (v *NullableInt32) Unset() {
|
|
127
|
+
v.value = nil
|
|
128
|
+
v.isSet = false
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
func NewNullableInt32(val *int32) *NullableInt32 {
|
|
132
|
+
return &NullableInt32{value: val, isSet: true}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
func (v NullableInt32) MarshalJSON() ([]byte, error) {
|
|
136
|
+
return json.Marshal(v.value)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
func (v *NullableInt32) UnmarshalJSON(src []byte) error {
|
|
140
|
+
v.isSet = true
|
|
141
|
+
return json.Unmarshal(src, &v.value)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
type NullableInt64 struct {
|
|
145
|
+
value *int64
|
|
146
|
+
isSet bool
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
func (v NullableInt64) Get() *int64 {
|
|
150
|
+
return v.value
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
func (v *NullableInt64) Set(val *int64) {
|
|
154
|
+
v.value = val
|
|
155
|
+
v.isSet = true
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
func (v NullableInt64) IsSet() bool {
|
|
159
|
+
return v.isSet
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
func (v *NullableInt64) Unset() {
|
|
163
|
+
v.value = nil
|
|
164
|
+
v.isSet = false
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
func NewNullableInt64(val *int64) *NullableInt64 {
|
|
168
|
+
return &NullableInt64{value: val, isSet: true}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
func (v NullableInt64) MarshalJSON() ([]byte, error) {
|
|
172
|
+
return json.Marshal(v.value)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
func (v *NullableInt64) UnmarshalJSON(src []byte) error {
|
|
176
|
+
v.isSet = true
|
|
177
|
+
return json.Unmarshal(src, &v.value)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
type NullableFloat32 struct {
|
|
181
|
+
value *float32
|
|
182
|
+
isSet bool
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
func (v NullableFloat32) Get() *float32 {
|
|
186
|
+
return v.value
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
func (v *NullableFloat32) Set(val *float32) {
|
|
190
|
+
v.value = val
|
|
191
|
+
v.isSet = true
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
func (v NullableFloat32) IsSet() bool {
|
|
195
|
+
return v.isSet
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
func (v *NullableFloat32) Unset() {
|
|
199
|
+
v.value = nil
|
|
200
|
+
v.isSet = false
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
func NewNullableFloat32(val *float32) *NullableFloat32 {
|
|
204
|
+
return &NullableFloat32{value: val, isSet: true}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
func (v NullableFloat32) MarshalJSON() ([]byte, error) {
|
|
208
|
+
return json.Marshal(v.value)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
|
|
212
|
+
v.isSet = true
|
|
213
|
+
return json.Unmarshal(src, &v.value)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
type NullableFloat64 struct {
|
|
217
|
+
value *float64
|
|
218
|
+
isSet bool
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
func (v NullableFloat64) Get() *float64 {
|
|
222
|
+
return v.value
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
func (v *NullableFloat64) Set(val *float64) {
|
|
226
|
+
v.value = val
|
|
227
|
+
v.isSet = true
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
func (v NullableFloat64) IsSet() bool {
|
|
231
|
+
return v.isSet
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
func (v *NullableFloat64) Unset() {
|
|
235
|
+
v.value = nil
|
|
236
|
+
v.isSet = false
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
func NewNullableFloat64(val *float64) *NullableFloat64 {
|
|
240
|
+
return &NullableFloat64{value: val, isSet: true}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
func (v NullableFloat64) MarshalJSON() ([]byte, error) {
|
|
244
|
+
return json.Marshal(v.value)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
|
|
248
|
+
v.isSet = true
|
|
249
|
+
return json.Unmarshal(src, &v.value)
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
type NullableString struct {
|
|
253
|
+
value *string
|
|
254
|
+
isSet bool
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
func (v NullableString) Get() *string {
|
|
258
|
+
return v.value
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
func (v *NullableString) Set(val *string) {
|
|
262
|
+
v.value = val
|
|
263
|
+
v.isSet = true
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
func (v NullableString) IsSet() bool {
|
|
267
|
+
return v.isSet
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
func (v *NullableString) Unset() {
|
|
271
|
+
v.value = nil
|
|
272
|
+
v.isSet = false
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
func NewNullableString(val *string) *NullableString {
|
|
276
|
+
return &NullableString{value: val, isSet: true}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
func (v NullableString) MarshalJSON() ([]byte, error) {
|
|
280
|
+
return json.Marshal(v.value)
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
func (v *NullableString) UnmarshalJSON(src []byte) error {
|
|
284
|
+
v.isSet = true
|
|
285
|
+
return json.Unmarshal(src, &v.value)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
type NullableTime struct {
|
|
289
|
+
value *time.Time
|
|
290
|
+
isSet bool
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
func (v NullableTime) Get() *time.Time {
|
|
294
|
+
return v.value
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
func (v *NullableTime) Set(val *time.Time) {
|
|
298
|
+
v.value = val
|
|
299
|
+
v.isSet = true
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
func (v NullableTime) IsSet() bool {
|
|
303
|
+
return v.isSet
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
func (v *NullableTime) Unset() {
|
|
307
|
+
v.value = nil
|
|
308
|
+
v.isSet = false
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
func NewNullableTime(val *time.Time) *NullableTime {
|
|
312
|
+
return &NullableTime{value: val, isSet: true}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
func (v NullableTime) MarshalJSON() ([]byte, error) {
|
|
316
|
+
return json.Marshal(v.value)
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
func (v *NullableTime) UnmarshalJSON(src []byte) error {
|
|
320
|
+
v.isSet = true
|
|
321
|
+
return json.Unmarshal(src, &v.value)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// IsNil checks if an input is nil
|
|
325
|
+
func IsNil(i interface{}) bool {
|
|
326
|
+
if i == nil {
|
|
327
|
+
return true
|
|
328
|
+
}
|
|
329
|
+
switch reflect.TypeOf(i).Kind() {
|
|
330
|
+
case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice:
|
|
331
|
+
return reflect.ValueOf(i).IsNil()
|
|
332
|
+
case reflect.Array:
|
|
333
|
+
return reflect.ValueOf(i).IsZero()
|
|
334
|
+
}
|
|
335
|
+
return false
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
type MappedNullable interface {
|
|
339
|
+
ToMap() (map[string]interface{}, error)
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// A wrapper for strict JSON decoding
|
|
343
|
+
func newStrictDecoder(data []byte) *json.Decoder {
|
|
344
|
+
dec := json.NewDecoder(bytes.NewBuffer(data))
|
|
345
|
+
dec.DisallowUnknownFields()
|
|
346
|
+
return dec
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Prevent trying to import "fmt"
|
|
350
|
+
func reportError(format string, a ...interface{}) error {
|
|
351
|
+
return fmt.Errorf(format, a...)
|
|
352
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @generated
|
|
5
|
+
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
|
|
6
|
+
*/
|
|
7
|
+
$finder = PhpCsFixer\Finder::create()
|
|
8
|
+
->in(__DIR__)
|
|
9
|
+
->exclude('vendor')
|
|
10
|
+
->exclude('test')
|
|
11
|
+
->exclude('tests')
|
|
12
|
+
;
|
|
13
|
+
|
|
14
|
+
$config = new PhpCsFixer\Config();
|
|
15
|
+
return $config->setRules([
|
|
16
|
+
'@PSR12' => true,
|
|
17
|
+
'phpdoc_order' => true,
|
|
18
|
+
'array_syntax' => [ 'syntax' => 'short' ],
|
|
19
|
+
'strict_comparison' => true,
|
|
20
|
+
'strict_param' => true,
|
|
21
|
+
'no_trailing_whitespace' => false,
|
|
22
|
+
'no_trailing_whitespace_in_comment' => false,
|
|
23
|
+
'braces' => false,
|
|
24
|
+
'single_blank_line_at_eof' => false,
|
|
25
|
+
'blank_line_after_namespace' => false,
|
|
26
|
+
'no_leading_import_slash' => false,
|
|
27
|
+
])
|
|
28
|
+
->setFinder($finder)
|
|
29
|
+
;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* ApiException
|
|
4
|
+
* PHP version 8.1
|
|
5
|
+
*
|
|
6
|
+
* @category Class
|
|
7
|
+
* @package {{invokerPackage}}
|
|
8
|
+
* @author OpenAPI Generator team
|
|
9
|
+
* @link https://openapi-generator.tech
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
{{>partial_header}}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
16
|
+
* https://openapi-generator.tech
|
|
17
|
+
* Do not edit the class manually.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
namespace {{invokerPackage}};
|
|
21
|
+
|
|
22
|
+
use \Exception;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* ApiException Class Doc Comment
|
|
26
|
+
*
|
|
27
|
+
* @category Class
|
|
28
|
+
* @package {{invokerPackage}}
|
|
29
|
+
* @author OpenAPI Generator team
|
|
30
|
+
* @link https://openapi-generator.tech
|
|
31
|
+
*/
|
|
32
|
+
class ApiException extends Exception
|
|
33
|
+
{
|
|
34
|
+
/**
|
|
35
|
+
* The HTTP body of the server response either as Json or string.
|
|
36
|
+
*
|
|
37
|
+
* @var \stdClass|string|null
|
|
38
|
+
*/
|
|
39
|
+
protected $responseBody;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The HTTP header of the server response.
|
|
43
|
+
*
|
|
44
|
+
* @var string[][]|null
|
|
45
|
+
*/
|
|
46
|
+
protected $responseHeaders;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The deserialized response object
|
|
50
|
+
*
|
|
51
|
+
* @var \stdClass|string|null
|
|
52
|
+
*/
|
|
53
|
+
protected $responseObject;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Constructor
|
|
57
|
+
*
|
|
58
|
+
* @param string $message Error message
|
|
59
|
+
* @param int $code HTTP status code
|
|
60
|
+
* @param string[][]|null $responseHeaders HTTP response header
|
|
61
|
+
* @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
|
|
62
|
+
*/
|
|
63
|
+
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
|
|
64
|
+
{
|
|
65
|
+
parent::__construct($message, $code);
|
|
66
|
+
$this->responseHeaders = $responseHeaders;
|
|
67
|
+
$this->responseBody = $responseBody;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Gets the HTTP response header
|
|
72
|
+
*
|
|
73
|
+
* @return string[][]|null HTTP response header
|
|
74
|
+
*/
|
|
75
|
+
public function getResponseHeaders()
|
|
76
|
+
{
|
|
77
|
+
return $this->responseHeaders;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Gets the HTTP body of the server response either as Json or string
|
|
82
|
+
*
|
|
83
|
+
* @return \stdClass|string|null HTTP body of the server response either as \stdClass or string
|
|
84
|
+
*/
|
|
85
|
+
public function getResponseBody()
|
|
86
|
+
{
|
|
87
|
+
return $this->responseBody;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Sets the deserialized response object (during deserialization)
|
|
92
|
+
*
|
|
93
|
+
* @param mixed $obj Deserialized response object
|
|
94
|
+
*
|
|
95
|
+
* @return void
|
|
96
|
+
*/
|
|
97
|
+
public function setResponseObject($obj)
|
|
98
|
+
{
|
|
99
|
+
$this->responseObject = $obj;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Gets the deserialized response object (during deserialization)
|
|
104
|
+
*
|
|
105
|
+
* @return mixed the deserialized response object
|
|
106
|
+
*/
|
|
107
|
+
public function getResponseObject()
|
|
108
|
+
{
|
|
109
|
+
return $this->responseObject;
|
|
110
|
+
}
|
|
111
|
+
}
|