Skip to content

Commit

Permalink
Merge pull request #952 from ItzNotABug/fix-project-id-encoding
Browse files Browse the repository at this point in the history
Fix: incorrect encoding.
  • Loading branch information
abnegate authored Aug 21, 2024
2 parents 703aea3 + c55eff9 commit c92942d
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion templates/android/docs/java/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Client client = new Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo']}}"){% if loop.last %};{% endif %} // {{ node[header].description }}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo'] | raw }}"){% if loop.last %};{% endif %} // {{ node[header].description }}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/android/docs/kotlin/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ val client = Client(context)
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo']}}") // {{node[header].description}}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo'] | raw }}") // {{node[header].description}}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set{{header}}('{{node[header]['x-appwrite']['demo']}}'){% if loop.last %};{% endif%} // {{node[header].description}}
.set{{header}}('{{node[header]['x-appwrite']['demo'] | raw }}'){% if loop.last %};{% endif%} // {{node[header].description}}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/deno/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set{{header}}('{{node[header]['x-appwrite']['demo']}}'){% if loop.last %};{% endif%} // {{node[header].description}}
.set{{header}}('{{node[header]['x-appwrite']['demo'] | raw }}'){% if loop.last %};{% endif%} // {{node[header].description}}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/dotnet/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Client client = new Client()
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
{% for node in method.auth %}
{% for key,header in node|keys %}
.Set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo']}}"){% if loop.last %};{% endif %} // {{node[header].description}}
.Set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo'] | raw }}"){% if loop.last %};{% endif %} // {{node[header].description}}
{% endfor %}{% endfor %}{% endif %}

{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = new {{ service.name | caseUcfirst }}(client);
Expand Down
2 changes: 1 addition & 1 deletion templates/flutter/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Client client = Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set{{header}}('{{node[header]['x-appwrite']['demo']}}'){% if loop.last %};{% endif%} // {{node[header].description}}
.set{{header}}('{{node[header]['x-appwrite']['demo'] | raw }}'){% if loop.last %};{% endif%} // {{node[header].description}}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/go/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {
client.SetEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
{% for node in method.auth %}
{% for key,header in node|keys %}
client.Set{{header}}("{{node[header]['x-{{ spec.title | caseLower }}']['demo']}}") // {{node[header].description}}
client.Set{{header}}("{{node[header]['x-appwrite']['demo'] | raw }}") // {{node[header].description}}
{% endfor %}
{% endfor %}

Expand Down
2 changes: 1 addition & 1 deletion templates/graphql/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Host: {{ spec.host }}
{% endfor %}
{% for node in method.security %}
{% for key,header in node | keys %}
{{ node[header]['name'] }}: {{ node[header]['x-appwrite']['demo'] }}
{{ node[header]['name'] }}: {{ node[header]['x-appwrite']['demo'] | raw }}
{% endfor %}
{% endfor %}
Content-Length: *Length of your entity body in bytes*
Expand Down
2 changes: 1 addition & 1 deletion templates/kotlin/docs/java/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Client client = new Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
{% for node in method.auth %}
{% for key,header in node|keys %}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo']}}"){% if loop.last %};{% endif %} // {{node[header].description}}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo'] | raw }}"){% if loop.last %};{% endif %} // {{node[header].description}}
{% endfor %}{% endfor %}{% endif %}

{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = new {{ service.name | caseUcfirst }}(client);
Expand Down
2 changes: 1 addition & 1 deletion templates/kotlin/docs/kotlin/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ val client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
{% for node in method.auth %}
{% for key,header in node|keys %}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo']}}") // {{node[header].description}}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo'] | raw }}") // {{node[header].description}}
{% endfor %}{% endfor %}{% endif %}

val {{ service.name | caseCamel }} = {{ service.name | caseUcfirst }}(client)
Expand Down
2 changes: 1 addition & 1 deletion templates/node/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = new sdk.Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set{{header}}('{{node[header]['x-appwrite']['demo']}}'){% if loop.last %};{% endif%} // {{node[header].description}}
.set{{header}}('{{node[header]['x-appwrite']['demo'] | raw }}'){% if loop.last %};{% endif%} // {{node[header].description}}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/php/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
->set{{header}}('{{node[header]['x-appwrite']['demo']}}'){% if loop.last%};{% endif%} // {{node[header].description}}
->set{{header}}('{{node[header]['x-appwrite']['demo'] | raw }}'){% if loop.last%};{% endif%} // {{node[header].description}}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/python/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ client = Client()
client.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
{% for node in method.auth %}
{% for key,header in node|keys %}
client.set_{{header | caseSnake}}('{{node[header]['x-appwrite']['demo']}}') # {{node[header].description}}
client.set_{{header | caseSnake}}('{{node[header]['x-appwrite']['demo'] | raw }}') # {{node[header].description}}
{% endfor %}
{% endfor %}

Expand Down
2 changes: 1 addition & 1 deletion templates/react-native/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set{{header}}('{{node[header]['x-appwrite']['demo']}}'){% if loop.last %};{% endif%} // {{node[header].description}}
.set{{header}}('{{node[header]['x-appwrite']['demo'] | raw }}'){% if loop.last %};{% endif%} // {{node[header].description}}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/rest/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Host: {{ spec.host }}
{% endfor %}
{% for node in method.security %}
{% for key,header in node | keys %}
{{ node[header]['name'] }}: {{ node[header]['x-appwrite']['demo'] }}
{{ node[header]['name'] }}: {{ node[header]['x-appwrite']['demo'] | raw }}
{% endfor %}
{% endfor %}
{% for key, header in method.headers %}
Expand Down
2 changes: 1 addition & 1 deletion templates/ruby/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ client = Client.new
.set_endpoint('https://cloud.appwrite.io/v1') # Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set_{{header|caseSnake}}('{{node[header]['x-appwrite']['demo']}}') # {{node[header].description}}
.set_{{header|caseSnake}}('{{node[header]['x-appwrite']['demo'] | raw }}') # {{node[header].description}}
{%~ endfor %}
{%~ endfor %}

Expand Down
2 changes: 1 addition & 1 deletion templates/swift/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let client = Client()
.setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint
{% for node in method.auth %}
{% for key,header in node|keys %}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo']}}") // {{node[header].description}}
.set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo'] | raw }}") // {{node[header].description}}
{% endfor %}
{% endfor %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/web/docs/example.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
{%~ for node in method.auth %}
{%~ for key,header in node|keys %}
.set{{header}}('{{node[header]['x-appwrite']['demo']}}'){% if loop.last %};{% endif%} // {{node[header].description}}
.set{{header}}('{{node[header]['x-appwrite']['demo'] | raw }}'){% if loop.last %};{% endif%} // {{node[header].description}}
{%~ endfor %}
{%~ endfor %}
{%~ endif %}
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"description": "Your project ID",
"in": "header",
"x-appwrite": {
"demo": "5df5acd0d48c2"
"demo": "<YOUR_PROJECT_ID>"
}
},
"Key": {
Expand Down

0 comments on commit c92942d

Please sign in to comment.