@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,79 @@
|
|
|
1
|
+
# {{invokerPackage}}\{{classname}}{{#if description}}
|
|
2
|
+
|
|
3
|
+
{{description}}{{/if}}
|
|
4
|
+
|
|
5
|
+
All URIs are relative to {{basePath}}.
|
|
6
|
+
|
|
7
|
+
Method | HTTP request | Description
|
|
8
|
+
------------- | ------------- | -------------
|
|
9
|
+
{{#operations}}{{#operation}}[**{{operationId}}()**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#if summary}}{{summary}}{{/if}}
|
|
10
|
+
{{/operation}}{{/operations}}{{#operations}}{{#operation}}
|
|
11
|
+
|
|
12
|
+
## `{{{operationId}}}()`
|
|
13
|
+
|
|
14
|
+
```php
|
|
15
|
+
{{{operationId}}}({{#allParams}}${{paramName}}{{#unless @last}}, {{/unless}}{{/allParams}}){{#if returnType}}: {{{returnType}}}{{/if}}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
{{{summary}}}{{#if notes}}
|
|
19
|
+
|
|
20
|
+
{{{notes}}}{{/if}}
|
|
21
|
+
|
|
22
|
+
### Example
|
|
23
|
+
|
|
24
|
+
```php
|
|
25
|
+
<?php
|
|
26
|
+
require_once(__DIR__ . '/vendor/autoload.php');
|
|
27
|
+
|
|
28
|
+
{{> php_doc_auth_partial}}
|
|
29
|
+
|
|
30
|
+
$apiInstance = new {{invokerPackage}}\Api\{{classname}}(
|
|
31
|
+
// If you want use custom http client, pass your client which implements `Psr\Http\Client\ClientInterface`.
|
|
32
|
+
// This is optional, `Psr18ClientDiscovery` will be used to find http client. For instance `GuzzleHttp\Client` implements that interface
|
|
33
|
+
new GuzzleHttp\Client(){{#hasAuthMethods}},
|
|
34
|
+
$config{{/hasAuthMethods}}
|
|
35
|
+
);
|
|
36
|
+
{{^exts.x-group-parameters}}
|
|
37
|
+
{{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#if description}} | {{{description}}}{{/if}}
|
|
38
|
+
{{/allParams}}
|
|
39
|
+
{{/exts.x-group-parameters}}
|
|
40
|
+
{{#exts.x-group-parameters}}
|
|
41
|
+
{{#allParams}}$associate_array['{{paramName}}'] = {{{example}}}; // {{{dataType}}}{{#if description}} | {{{description}}}{{/if}}
|
|
42
|
+
{{/allParams}}
|
|
43
|
+
{{/exts.x-group-parameters}}
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
{{#if returnType}}$result = {{/if}}$apiInstance->{{{operationId}}}({{^exts.x-group-parameters}}{{#allParams}}${{paramName}}{{#unless @last}}, {{/unless}}{{/allParams}}{{/exts.x-group-parameters}}{{#exts.x-group-parameters}}$associate_array{{/exts.x-group-parameters}});{{#if returnType}}
|
|
47
|
+
print_r($result);{{/if}}
|
|
48
|
+
} catch (Exception $e) {
|
|
49
|
+
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL;
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Parameters
|
|
54
|
+
|
|
55
|
+
{{#exts.x-group-parameters}}
|
|
56
|
+
Note: the input parameter is an associative array with the keys listed as the parameter name below.
|
|
57
|
+
|
|
58
|
+
{{/exts.x-group-parameters}}
|
|
59
|
+
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#if @last}}Name | Type | Description | Notes
|
|
60
|
+
------------- | ------------- | ------------- | -------------{{/if}}{{/allParams}}
|
|
61
|
+
{{#allParams}} **{{paramName}}** | {{#isFile}}**{{{dataType}}}**{{/isFile}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{{dataType}}}**](../Model/{{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#if defaultValue}} [default to {{defaultValue}}]{{/if}}
|
|
62
|
+
{{/allParams}}
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
{{#if returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**](../Model/{{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/if}}{{#unless returnType}}void (empty response body){{/unless}}
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../../README.md#{{{name}}}){{#unless @last}}, {{/unless}}{{/authMethods}}
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: {{#consumes}}`{{{mediaType}}}`{{#unless @last}}, {{/unless}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
|
|
75
|
+
- **Accept**: {{#produces}}`{{{mediaType}}}`{{#unless @last}}, {{/unless}}{{/produces}}{{^produces}}Not defined{{/produces}}
|
|
76
|
+
|
|
77
|
+
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
|
78
|
+
[[Back to Model list]](../../README.md#models)
|
|
79
|
+
[[Back to README]](../../README.md){{/operation}}{{/operations}}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
{{#composerPackageName}}
|
|
3
|
+
"name": "{{{.}}}",
|
|
4
|
+
{{/composerPackageName}}
|
|
5
|
+
{{#artifactVersion}}
|
|
6
|
+
"version": "{{{.}}}",
|
|
7
|
+
{{/artifactVersion}}
|
|
8
|
+
"description": "{{{appDescription}}}",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"openapitools",
|
|
11
|
+
"openapi-generator",
|
|
12
|
+
"openapi",
|
|
13
|
+
"php",
|
|
14
|
+
"sdk",
|
|
15
|
+
"rest",
|
|
16
|
+
"api"
|
|
17
|
+
],
|
|
18
|
+
"homepage": "{{{artifactUrl}}}",
|
|
19
|
+
"license": "{{{licenseName}}}",
|
|
20
|
+
"authors": [
|
|
21
|
+
{
|
|
22
|
+
"name": "{{{developerOrganization}}}",
|
|
23
|
+
"homepage": "{{{developerOrganizationUrl}}}"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"config": {
|
|
27
|
+
"sort-packages": true
|
|
28
|
+
},
|
|
29
|
+
"require": {
|
|
30
|
+
"php": "^8.1",
|
|
31
|
+
"ext-curl": "*",
|
|
32
|
+
"ext-json": "*",
|
|
33
|
+
"ext-mbstring": "*",
|
|
34
|
+
"guzzlehttp/psr7": "^1.8 || ^2.0",
|
|
35
|
+
"php-http/async-client-implementation": "^1.0",
|
|
36
|
+
"php-http/client-common": "^2.4",
|
|
37
|
+
"php-http/discovery": "^1.14",
|
|
38
|
+
"php-http/httplug": "^2.2",
|
|
39
|
+
"psr/http-client-implementation": "^1.0",
|
|
40
|
+
"psr/http-factory": "^1.0",
|
|
41
|
+
"psr/http-factory-implementation": "^1.0",
|
|
42
|
+
"psr/http-message": "^1.0"
|
|
43
|
+
},
|
|
44
|
+
"require-dev": {
|
|
45
|
+
"phpunit/phpunit": "^8.0 || ^9.0",
|
|
46
|
+
"friendsofphp/php-cs-fixer": "^3.5",
|
|
47
|
+
"guzzlehttp/guzzle": "^7.0",
|
|
48
|
+
"php-http/guzzle7-adapter": "^1.0"
|
|
49
|
+
},
|
|
50
|
+
"autoload": {
|
|
51
|
+
"psr-4": { "{{{escapedInvokerPackage}}}\\" : "{{{srcBasePath}}}/" }
|
|
52
|
+
},
|
|
53
|
+
"autoload-dev": {
|
|
54
|
+
"psr-4": { "{{{escapedInvokerPackage}}}\\Test\\" : "{{{testBasePath}}}/" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
{{#models}}
|
|
3
|
+
{{#model}}
|
|
4
|
+
/**
|
|
5
|
+
* {{classname}}
|
|
6
|
+
*
|
|
7
|
+
* PHP version 8.1
|
|
8
|
+
*
|
|
9
|
+
* @category Class
|
|
10
|
+
* @package {{invokerPackage}}
|
|
11
|
+
* @author OpenAPI Generator team
|
|
12
|
+
* @link https://openapi-generator.tech
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
{{>partial_header}}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
19
|
+
* https://openapi-generator.tech
|
|
20
|
+
* Do not edit the class manually.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
namespace {{modelPackage}};
|
|
24
|
+
{{^isEnum}}
|
|
25
|
+
{{^parentSchema}}
|
|
26
|
+
|
|
27
|
+
use \ArrayAccess;
|
|
28
|
+
{{/parentSchema}}
|
|
29
|
+
{{/isEnum}}
|
|
30
|
+
use \{{invokerPackage}}\ObjectSerializer;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* {{classname}} Class Doc Comment
|
|
34
|
+
*
|
|
35
|
+
* @category Class
|
|
36
|
+
{{#if description}}
|
|
37
|
+
* @description {{description}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
* @package {{invokerPackage}}
|
|
40
|
+
* @author OpenAPI Generator team
|
|
41
|
+
* @link https://openapi-generator.tech
|
|
42
|
+
{{^isEnum}}
|
|
43
|
+
* @implements \ArrayAccess<string, mixed>
|
|
44
|
+
{{/isEnum}}
|
|
45
|
+
*/
|
|
46
|
+
{{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}}
|
|
47
|
+
{{/model}}{{/models}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# {{#models}}{{#model}}# {{classname}}
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} |{{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}}{{#if defaultValue}} [default to {{{defaultValue}}}]{{/if}}
|
|
8
|
+
{{/vars}}
|
|
9
|
+
|
|
10
|
+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md){{/model}}{{/models}}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
class {{classname}}
|
|
2
|
+
{
|
|
3
|
+
/**
|
|
4
|
+
* Possible values of this enum
|
|
5
|
+
*/
|
|
6
|
+
{{#allowableValues}}
|
|
7
|
+
{{#enumVars}}
|
|
8
|
+
{{#enumDescription}}
|
|
9
|
+
/**
|
|
10
|
+
* {{enumDescription}}
|
|
11
|
+
*/
|
|
12
|
+
{{/enumDescription}}
|
|
13
|
+
public const {{{name}}} = {{{value}}};
|
|
14
|
+
|
|
15
|
+
{{/enumVars}}
|
|
16
|
+
{{/allowableValues}}
|
|
17
|
+
/**
|
|
18
|
+
* Gets allowable values of the enum
|
|
19
|
+
* @return string[]
|
|
20
|
+
*/
|
|
21
|
+
public static function getAllowableEnumValues()
|
|
22
|
+
{
|
|
23
|
+
return [
|
|
24
|
+
{{#allowableValues}}
|
|
25
|
+
{{#enumVars}}
|
|
26
|
+
self::{{{name}}}{{#unless @last}},
|
|
27
|
+
{{/unless}}
|
|
28
|
+
{{/enumVars}}
|
|
29
|
+
{{/allowableValues}}
|
|
30
|
+
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
}
|