Skip to content

Commit 8371513

Browse files
committed
Squashed commit of the following:
commit c5a0d0f7394aa742fa336fff7e7c1d3049761868 Merge: 8c4991ba3ed f8ff8c87609 Author: William Cheng <[email protected]> Date: Tue Aug 17 18:28:12 2021 +0800 Merge branch 'mustache-linting' of https://github.com/NathanBaulch/openapi-generator into NathanBaulch-mustache-linting commit f8ff8c87609b1ca36fa26fb8474806999638195e Author: Nathan Baulch <[email protected]> Date: Thu Aug 5 14:12:47 2021 +1000 Reorder tags that handle missing values commit f5d8a33709d6a3f846a9fe4520b78c3d637051d9 Author: Nathan Baulch <[email protected]> Date: Thu Aug 5 14:08:59 2021 +1000 Use dot notation where possible commit 493d14921e2333f3ae19ef6fc89318b7e263a80c Author: Nathan Baulch <[email protected]> Date: Thu Aug 5 14:10:49 2021 +1000 Remove empty tags commit 32480dc53f48227d55531b94e307d72671373737 Author: Nathan Baulch <[email protected]> Date: Thu Aug 5 10:41:58 2021 +1000 Remove redundant sections commit a8edabd722c34aa094b4aeb11c22664529c3a219 Author: Nathan Baulch <[email protected]> Date: Wed Aug 4 22:02:22 2021 +1000 Trim extra EOF new lines commit e89bd7458e3594bf0d30e580bc9408e45b018a57 Author: Nathan Baulch <[email protected]> Date: Wed Aug 4 21:59:26 2021 +1000 Trim trailing whitespace
1 parent b8f8d40 commit 8371513

19 files changed

+56
-57
lines changed

.generator/templates/README.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{{projectName}}}
22
{{#appDescriptionWithNewLines}}
3-
{{{appDescriptionWithNewLines}}}
3+
{{{.}}}
44
{{/appDescriptionWithNewLines}}
55

66
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

.generator/templates/README_common.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ All URIs are relative to *{{basePath}}*
4242

4343
Class | Method | HTTP request | Description
4444
------------ | ------------- | ------------- | -------------
45-
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
45+
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}}
4646
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
4747

4848
## Documentation For Models

.generator/templates/README_onlypackage.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# {{{projectName}}}
22
{{#appDescription}}
3-
{{{appDescription}}}
3+
{{{.}}}
44
{{/appDescription}}
55

66
The `{{packageName}}` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

.generator/templates/api.mustache

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class {{classname}}(object):
4646
{{/requiredParams}}
4747
**kwargs
4848
):
49-
"""{{#summary}}{{{.}}}{{/summary}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501
49+
"""{{{summary}}}{{^summary}}{{operationId}}{{/summary}} # noqa: E501
5050

5151
{{#notes}}
52-
{{{notes}}} # noqa: E501
52+
{{{.}}} # noqa: E501
5353
{{/notes}}
5454
This method makes a synchronous HTTP request by default. To make an
5555
asynchronous HTTP request, please pass async_req=True
@@ -64,17 +64,17 @@ class {{classname}}(object):
6464
{{/requiredParams}}
6565
{{#requiredParams}}
6666
{{^defaultValue}}
67-
{{paramName}} ({{dataType}}):{{#description}} {{{description}}}{{/description}}
67+
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}{{/description}}
6868
{{/defaultValue}}
6969
{{/requiredParams}}
7070
{{#requiredParams}}
7171
{{#defaultValue}}
72-
{{paramName}} ({{dataType}}):{{#description}} {{{description}}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}]
72+
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} defaults to {{{defaultValue}}}, must be one of [{{{defaultValue}}}]
7373
{{/defaultValue}}
7474
{{/requiredParams}}
7575

7676
Keyword Args:{{#optionalParams}}
77-
{{paramName}} ({{dataType}}):{{#description}} {{{description}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}}{{/optionalParams}}
77+
{{paramName}} ({{dataType}}):{{#description}} {{{.}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}}{{/optionalParams}}
7878
_return_http_data_only (bool): response data without head status
7979
code and headers. Default is True.
8080
_preload_content (bool): if False, the urllib3.HTTPResponse object
@@ -96,7 +96,7 @@ class {{classname}}(object):
9696
async_req (bool): execute request asynchronously
9797

9898
Returns:
99-
{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}None{{/returnType}}
99+
{{returnType}}{{^returnType}}None{{/returnType}}
100100
If the method is called asynchronously, returns the request
101101
thread.
102102
"""
@@ -127,7 +127,7 @@ class {{classname}}(object):
127127

128128
self.{{operationId}} = _Endpoint(
129129
settings={
130-
'response_type': {{#returnType}}({{{returnType}}},){{/returnType}}{{^returnType}}None{{/returnType}},
130+
'response_type': {{#returnType}}({{{.}}},){{/returnType}}{{^returnType}}None{{/returnType}},
131131
{{#authMethods}}
132132
{{#-first}}
133133
'auth': [
@@ -226,10 +226,10 @@ class {{classname}}(object):
226226
{{#hasValidation}}
227227
('{{paramName}}',): {
228228
{{#maxLength}}
229-
'max_length': {{maxLength}},{{/maxLength}}{{#minLength}}
230-
'min_length': {{minLength}},{{/minLength}}{{#maxItems}}
231-
'max_items': {{maxItems}},{{/maxItems}}{{#minItems}}
232-
'min_items': {{minItems}},{{/minItems}}{{#maximum}}
229+
'max_length': {{.}},{{/maxLength}}{{#minLength}}
230+
'min_length': {{.}},{{/minLength}}{{#maxItems}}
231+
'max_items': {{.}},{{/maxItems}}{{#minItems}}
232+
'min_items': {{.}},{{/minItems}}{{#maximum}}
233233
{{#exclusiveMaximum}}'exclusive_maximum'{{/exclusiveMaximum}}{{^exclusiveMaximum}}'inclusive_maximum'{{/exclusiveMaximum}}: {{maximum}},{{/maximum}}{{#minimum}}
234234
{{#exclusiveMinimum}}'exclusive_minimum'{{/exclusiveMinimum}}{{^exclusiveMinimum}}'inclusive_minimum'{{/exclusiveMinimum}}: {{minimum}},{{/minimum}}{{#pattern}}
235235
'regex': {

.generator/templates/api_client.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class ApiClient(object):
7171
self.default_headers[header_name] = header_value
7272
self.cookie = cookie
7373
# Set default User-Agent.
74-
self.user_agent = '{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}'
74+
self.user_agent = '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/httpUserAgent}}'
7575

7676
def __enter__(self):
7777
return self

.generator/templates/api_doc.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# {{packageName}}.{{classname}}{{#description}}
2-
{{description}}{{/description}}
2+
{{.}}{{/description}}
33

44
All URIs are relative to *{{basePath}}*
55

66
Method | HTTP request | Description
77
------------- | ------------- | -------------
8-
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
8+
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}}
99
{{/operation}}{{/operations}}
1010

1111
{{#operations}}
1212
{{#operation}}
1313
# **{{{operationId}}}**
14-
> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{^-last}}, {{/-last}}{{/defaultValue}}{{/requiredParams}})
14+
> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#requiredParams}}{{^defaultValue}}{{paramName}}{{^-last}}, {{/-last}}{{/defaultValue}}{{/requiredParams}})
1515

1616
{{{summary}}}{{#notes}}
1717

18-
{{{notes}}}{{/notes}}
18+
{{{.}}}{{/notes}}
1919

2020
### Example
2121

.generator/templates/api_doc_example.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ with {{{packageName}}}.ApiClient() as api_client:
2222
{{/defaultValue}}
2323
{{/requiredParams}}
2424
{{#optionalParams}}
25-
{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}}
25+
{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}}
2626
{{/optionalParams}}
2727
{{#requiredParams}}
2828
{{#-last}}

.generator/templates/api_test.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class {{#operations}}Test{{classname}}(unittest.TestCase):
2020
"""Test case for {{{operationId}}}
2121

2222
{{#summary}}
23-
{{{summary}}} # noqa: E501
23+
{{{.}}} # noqa: E501
2424
{{/summary}}
2525
"""
2626
pass

.generator/templates/configuration.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Configuration(object):
7171
:param server_operation_variables: Mapping from operation ID to a mapping with
7272
string values to replace variables in templated server configuration.
7373
The validation of enums is performed for variables with defined enum values before.
74-
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
74+
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
7575
in PEM format
7676

7777
{{#hasAuthMethods}}

.generator/templates/git_push.sh.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,3 @@ git pull origin master
5555
# Pushes (Forces) the changes in the local repository up to the remote repository
5656
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
5757
git push origin master 2>&1 | grep -v 'To https'
58-

0 commit comments

Comments
 (0)