Skip to content

Commit 75f6cad

Browse files
committed
feat(gdscript): improve descriptions
/spend 1h
1 parent 516e1ab commit 75f6cad

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

modules/openapi-generator/src/main/resources/gdscript/api_doc_example.handlebars

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ var {{paramName}} = {{dataType}}.new()
2525
api.{{{operationIdSnakeCase}}}(
2626
{{#each allParams}}
2727
# {{paramName}}{{#if dataType}}: {{dataType}}{{/if}}{{#if defaultValue}} = {{{defaultValue}}}{{/if}}{{#if example}} Eg: {{{example}}}{{/if}}
28-
# {{{description}}}
29-
{{! `example` is not available here, not sure why }}
28+
{{~#if description}}
29+
30+
# {{{description}}}{{/if}}
3031
{{paramName}},
3132
{{/each}}
3233
# On Success

modules/openapi-generator/src/main/resources/gdscript/partials/api_method_params.handlebars

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{{#each allParams}}
22
# {{paramName}}{{#if dataType}}: {{dataType}}{{/if}}{{#if defaultValue}} = {{{defaultValue}}}{{/if}}{{#if example}} Eg: {{{example}}}{{/if}}
3-
# {{{description}}}
3+
{{~#if description}}
4+
5+
# {{{description}}}{{/if}}
46
{{paramName}}{{#if required}}{{#if dataType}}: {{{dataType}}}{{/if}}{{/if}}{{#unless required}} = {{#if defaultValue}}{{{defaultValue}}}{{/if}}{{#unless defaultValue}}null{{/unless}}{{/unless}},
57
{{/each}}
68
on_success: Callable = Callable(), # func(response: {{>partials/api_response_class_name}})

samples/client/petstore/gdscript/addons/oas.petstore.client/apis/DemoPetApi.gd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ func delete_pet(
9595
# Pet id to delete
9696
petId: float,
9797
# apiKey: String = "" Eg: apiKey_example
98-
#
9998
apiKey = "",
10099
on_success: Callable = Callable(), # func(response: DemoApiResponse)
101100
on_failure: Callable = Callable(), # func(error: DemoApiError)
@@ -133,7 +132,6 @@ func delete_pet_threaded(
133132
# Pet id to delete
134133
petId: float,
135134
# apiKey: String = "" Eg: apiKey_example
136-
#
137135
apiKey = "",
138136
on_success: Callable = Callable(), # func(response: DemoApiResponse)
139137
on_failure: Callable = Callable(), # func(error: DemoApiError)

samples/client/petstore/gdscript/addons/oas.petstore.client/apis/DemoPetApi.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ api.delete_pet(
9898
# Pet id to delete
9999
petId,
100100
# apiKey: String = "" Eg: apiKey_example
101-
#
102101
apiKey,
103102
# On Success
104103
func(response):

0 commit comments

Comments
 (0)