Skip to content

Commit 71205eb

Browse files
Merge pull request #479 from appwrite/fix-service-level-param-example
fix named parameters in docs
2 parents 41f80d6 + c3d05ad commit 71205eb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/dart/docs/example.md.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'package:{{ language.params.packageName }}/{{ language.params.packageName
55

66
void main() { // Init SDK
77
Client client = Client();
8-
{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = {{service.name | caseUcfirst}}(client{% if service.globalParams | length %}{% for parameter in service.globalParams %}, {{ parameter | paramExample }}{% endfor %}{% endif %});
8+
{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = {{service.name | caseUcfirst}}(client{% if service.globalParams | length %}{% for parameter in service.globalParams %}, {{ parameter.name | caseCamel | overrideIdentifier }}: {{ parameter | paramExample }}{% endfor %}{% endif %});
99

1010
{% if method.security|length > 0 %}
1111
client
@@ -22,7 +22,7 @@ void main() { // Init SDK
2222

2323
{% endif %}
2424
{% if parameter.required %}
25-
{{ parameter.name | caseCamel }}: {{ parameter | paramExample | replace({'<field-name>': (parameter.name | caseCamel) }) | raw }},
25+
{{ parameter.name | caseCamel | overrideIdentifier }}: {{ parameter | paramExample | replace({'<field-name>': (parameter.name | caseCamel) }) | raw }},
2626
{% endif %}
2727
{% endfor %}{% if method.parameters.all | filter((param) => not param.isGlobal) | length > 0 %} {% endif %});
2828

templates/flutter/docs/example.md.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'package:{{ language.params.packageName }}/{{ language.params.packageName
55

66
void main() { // Init SDK
77
Client client = Client();
8-
{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = {{service.name | caseUcfirst}}(client{% if service.globalParams | length %}{% for parameter in service.globalParams %}, {{ parameter | paramExample }}{% endfor %}{% endif %});
8+
{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = {{service.name | caseUcfirst}}(client{% if service.globalParams | length %}{% for parameter in service.globalParams %}, {{ parameter.name | caseCamel | overrideIdentifier }}: {{ parameter | paramExample }}{% endfor %}{% endif %});
99

1010
{% if method.security|length > 0 %}
1111
client
@@ -40,7 +40,7 @@ FutureBuilder(
4040

4141
{% endif %}
4242
{% if parameter.required %}
43-
{{ parameter.name | caseCamel }}: {{ parameter | paramExample }},
43+
{{ parameter.name | caseCamel | overrideIdentifier }}: {{ parameter | paramExample }},
4444
{% endif %}
4545
{% endfor %}{% if method.parameters.all | filter((param) => not param.isGlobal) | length > 0 %} {% endif %}
4646
), //works for both public file and private file, for private files you need to be logged in

0 commit comments

Comments
 (0)