Skip to content

Commit

Permalink
Use double curly braket instead of triple - fix a few links and forma…
Browse files Browse the repository at this point in the history
…tting issues.
  • Loading branch information
dvacca-onfido committed Nov 5, 2024
1 parent 8542c76 commit 90a2f2b
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion generators/common/templates/README_footer.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This library is automatically generated using [OpenAPI Generator](https://openap

For contributions to the tests instead, please follow the steps below:

1. [Fork the repository](https://github.com/{{ gitUserId }}/{{ gitRepoId }}/fork)
1. Fork the [repository](https://github.com/{{ gitUserId }}/{{ gitRepoId }}/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Make your changes
4. Commit your changes (`git commit -am 'Add detailed description of the feature'`)
Expand Down
26 changes: 13 additions & 13 deletions generators/java/okhttp-gson/templates/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ The official Java library for integrating with the Onfido API.

Documentation is available at <{{ documentationUrl }}>.

{{>README_frontend_warning}}
{{ >README_frontend_warning }}

This version uses Onfido API {{ apiVersion }}. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details. The guide explains which client library versions use which API versions.

![Build Status](https://github.com/{{{ gitUserId }}}/{{{ gitRepoId }}}/actions/workflows/maven.yml/badge.svg)
![Build Status](https://github.com/{{ gitUserId }}/{{ gitRepoId }}/actions/workflows/maven.yml/badge.svg)

## Installation & Usage

Expand Down Expand Up @@ -38,17 +38,17 @@ To deploy it to a remote Maven repository instead, configure the settings of the
mvn clean deploy
```

Refer to the [OSSRH Guide](https://central.sonatype.org/publish/publish-guide/) for more information.
Refer to the [OSSRH Guide](https://central.sonatype.org/publish/publish-guide) for more information.

#### Maven users

Add this dependency to your project's POM:

```xml
<dependency>
<groupId>{{{groupId}}}</groupId>
<artifactId>{{{artifactId}}}</artifactId>
<version>{{{artifactVersion}}}</version>
<groupId>{{ groupId }}</groupId>
<artifactId>{{ artifactId }}</artifactId>
<version>{{ artifactVersion }}</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -59,12 +59,12 @@ Add this dependency to your project's build file:

```groovy
repositories {
mavenCentral() // Needed if the '{{{artifactId}}}' jar has been published to maven central.
mavenLocal() // Needed if the '{{{artifactId}}}' jar has been published to the local maven repo.
mavenCentral() // Needed if the '{{ artifactId }}' jar has been published to maven central.
mavenLocal() // Needed if the '{{ artifactId }}' jar has been published to the local maven repo.
}

dependencies {
implementation "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}"
implementation "{{ groupId }}:{{ artifactId }}:{{ artifactVersion }}"
}
```

Expand All @@ -78,10 +78,10 @@ mvn clean package

Then manually install the following JARs:

- `target/{{{artifactId}}}-{{{artifactVersion}}}.jar`
- `target/{{ artifactId }}-{{ artifactVersion }}.jar`
- `target/lib/*.jar`

The latest version can be found at: https://search.maven.org/artifact/{{ groupId }}/{{ artifactId }}/{{ artifactVersion }}
The latest version can be found at <https://search.maven.org/artifact/{{ groupId }}/{{ artifactId }}/{{ artifactVersion }}/jar>.

## Getting Started

Expand Down Expand Up @@ -141,7 +141,7 @@ try {

### Webhook event verification

{{>README_webhook_verification}}
{{ >README_webhook_verification }}

```java
try {
Expand All @@ -167,4 +167,4 @@ It's recommended to create an instance of `DefaultApi` per thread in a multithre

Except for retrieving Task object's outputs, avoid using `getAdditionalProperty()` or `getAdditionalProperties()` methods to access undefined properties to prevent breaking changes when these fields appear.

{{>README_footer}}
{{ >README_footer }}
22 changes: 11 additions & 11 deletions generators/php/templates/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ This version uses Onfido API {{ apiVersion }}. Refer to our [API versioning guid

PHP 7.4 and later. Should also work with PHP 8.0.

[![Latest release](https://badge.fury.io/ph/{{{gitUserId}}}%2F{{{gitRepoId}}}.svg)](https://badge.fury.io/ph/{{{gitUserId}}}%2F{{{gitRepoId}}})
![Build Status](https://github.com/{{{gitUserId}}}/{{{gitRepoId}}}/actions/workflows/php.yml/badge.svg)
[![Latest release](https://badge.fury.io/ph/{{ gitUserId }}%2F{{ gitRepoId }}.svg)](https://badge.fury.io/ph/{{ gitUserId }}%2F{{ gitRepoId }})
![Build Status](https://github.com/{{ gitUserId }}/{{ gitRepoId }}/actions/workflows/php.yml/badge.svg)

### Installation

Expand All @@ -26,11 +26,11 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow
"repositories": [
{
"type": "vcs",
"url": "https://{{gitHost}}/{{gitUserId}}/{{gitRepoId}}.git"
"url": "https://{{ gitHost }}/{{ gitUserId }}/{{ gitRepoId }}.git"
}
],
"require": {
"{{gitUserId}}/{{gitRepoId}}": "*@dev"
"{{ gitUserId }}/{{ gitRepoId }}": "*@dev"
}
}
```
Expand All @@ -43,7 +43,7 @@ Download the files and include `autoload.php`:

```php
<?php
require_once('/path/to/{{packageName}}/vendor/autoload.php');
require_once('/path/to/{{ packageName }}/vendor/autoload.php');
```

## Getting Started
Expand All @@ -54,11 +54,11 @@ Please follow the [installation instructions](#installation--usage) and then run
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$configuration = {{invokerPackage}}\Configuration::getDefaultConfiguration();
$configuration = {{ invokerPackage }}\Configuration::getDefaultConfiguration();
$configuration->setApiToken($_ENV['ONFIDO_API_TOKEN']);
$configuration->setRegion({{invokerPackage}}\Region::EU); // Supports `Region::EU`, `Region::US`, and `Region::CA`
$configuration->setRegion({{ invokerPackage }}\Region::EU); // Supports `Region::EU`, `Region::US`, and `Region::CA`

$onfidoApi = new {{invokerPackage}}\Api\DefaultApi(
$onfidoApi = new {{ invokerPackage }}\Api\DefaultApi(
new \GuzzleHttp\Client([
'timeout' => 30,
'connect_timeout' => 30,
Expand All @@ -72,7 +72,7 @@ $onfidoApi = new {{invokerPackage}}\Api\DefaultApi(
```php
try {
$applicant = $onfidoApi->createApplicant(
new {{invokerPackage}}\Model\ApplicantBuilder(
new {{ invokerPackage }}\Model\ApplicantBuilder(
[
'first_name' => 'First',
'last_name' => 'Last'
Expand All @@ -84,7 +84,7 @@ try {

// ...

} catch ({{invokerPackage}}\ApiException $ex) {
} catch ({{ invokerPackage }}\ApiException $ex) {
// Handle API exception
echo 'Caught exception: ', $ex->getMessage(), "\n";
}
Expand Down Expand Up @@ -112,4 +112,4 @@ try {

Except for accessing Task object's outputs, avoid using the square bracket syntax (i.e. `[]`) to access undefined properties to prevent breaking changes when these fields appear.

{{>README_footer}}
{{ >README_footer }}
28 changes: 14 additions & 14 deletions generators/python/urllib3/templates/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Documentation is available at <{{ documentationUrl }}>.

This version uses Onfido API {{ apiVersion }}. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details. It explains which client library versions use which versions of the API.

[![PyPI version](https://badge.fury.io/py/{{{distributionPackageName}}}.svg)](https://badge.fury.io/py/{{{distributionPackageName}}})
![Build Status](https://github.com/{{{gitUserId}}}/{{{gitRepoId}}}/actions/workflows/python.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/{{ distributionPackageName }}.svg)](https://badge.fury.io/py/{{ distributionPackageName }})
![Build Status](https://github.com/{{ gitUserId }}/{{ gitRepoId }}/actions/workflows/python.yml/badge.svg)

## Installation & Usage

### Requirements

Python {{{generatorLanguageVersion}}}
Python {{ generatorLanguageVersion }}

### Installation

Expand All @@ -22,25 +22,25 @@ Python {{{generatorLanguageVersion}}}
If the Python package is hosted on a repository, you can install it directly using:

```sh
pip install {{{distributionPackageName}}}
pip install {{ distributionPackageName }}
```

Then import the package:

```python
import {{{packageName}}}
import {{ packageName }}
```

#### Poetry

```sh
poetry add {{{distributionPackageName}}}
poetry add {{ distributionPackageName }}
```

Then import the package:

```python
import {{{packageName}}}
import {{ packageName }}
```

### Tests
Expand All @@ -52,18 +52,18 @@ Execute `pytest` to run the tests.
Import the `DefaultApi` object, this is the main object used for interfacing with the API:

```python
import {{{packageName}}}
import {{ packageName }}

import urllib3
from os import environ

configuration = {{{packageName}}}.Configuration(
configuration = {{ packageName }}.Configuration(
api_token=environ['ONFIDO_API_TOKEN'],
region={{{packageName}}}.configuration.Region.EU, # Supports `EU`, `US` and `CA`
region={{ packageName }}.configuration.Region.EU, # Supports `EU`, `US` and `CA`
timeout=urllib3.util.Timeout(connect=60.0, read=60.0)
)

with {{{packageName}}}.ApiClient(configuration) as api_client:
with {{ packageName }}.ApiClient(configuration) as api_client:
onfido_api = onfido.DefaultApi(api_client)
...
```
Expand Down Expand Up @@ -97,11 +97,11 @@ Specific exception types are defined into [exceptions.py](onfido/exceptions.py).

### Webhook event verification

{{>README_webhook_verification}}
{{ >README_webhook_verification }}

```python
try:
verifier = {{{packageName}}}.WebhookEventVerifier(os.environ["ONFIDO_WEBHOOK_SECRET_TOKEN"])
verifier = {{ packageName }}.WebhookEventVerifier(os.environ["ONFIDO_WEBHOOK_SECRET_TOKEN"])

signature = "a0...760e"

Expand All @@ -117,4 +117,4 @@ Specific exception types are defined into [exceptions.py](onfido/exceptions.py).

Except for accessing Task object's outputs, avoid using the `additional_properties` dictionary to access undefined properties to prevent breaking changes when these fields appear.

{{>README_footer}}
{{ >README_footer }}
16 changes: 8 additions & 8 deletions generators/ruby/faraday/templates/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ Refer to the documentation at <{{ documentationUrl }}>.

This version uses Onfido API {{ apiVersion }}. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details of which client library versions use which versions of the API.

[![Gem Version](https://badge.fury.io/rb/{{{gemName}}}.svg)](https://badge.fury.io/rb/{{{gemName}}})
![Build Status](https://github.com/onfido/{{{gitRepoId}}}/actions/workflows/ruby.yml/badge.svg)
[![Gem Version](https://badge.fury.io/rb/{{ gemName }}.svg)](https://badge.fury.io/rb/{{ gemName }})
![Build Status](https://github.com/onfido/{{ gitRepoId }}/actions/workflows/ruby.yml/badge.svg)

## Installation & Usage

### Installation

```ruby
gem {{{gemName}}}, '~> {{gemVersion}}'
gem {{ gemName }}, '~> {{ gemVersion }}'
```

Configure with your API token, region and optional timeout (default value is 30):

```ruby
require {{{gemName}}}
require {{ gemName }}

Onfido.configure do |config|
config.api_token = ENV["ONFIDO_API_TOKEN"]
config.region = Onfido::Region::EU
config.region = config.region[:EU]
config.timeout = 30
end

Expand All @@ -42,7 +42,7 @@ applicant = onfido_api.create_applicant(
)
```

Documentation and code examples can be found at <https://documentation.onfido.com>.
Documentation and code examples can be found at <{{ documentationUrl }}>.

## Error Handling

Expand All @@ -65,7 +65,7 @@ end

### Webhook event verification

{{>README_webhook_verification}}
{{ >README_webhook_verification }}

```ruby
require 'onfido/webhook_event_verifier'
Expand All @@ -84,4 +84,4 @@ end
end
```

{{>README_footer}}
{{ >README_footer }}
8 changes: 4 additions & 4 deletions generators/typescript-axios/templates/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ The official Node.js library for integrating with the Onfido API.

Documentation is available at <{{ documentationUrl }}>.

{{>README_frontend_warning}}
{{ >README_frontend_warning }}

This version uses Onfido API {{ apiVersion }}. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details of which client library versions use which versions of the API.

[![npm version](https://badge.fury.io/js/@onfido%2Fapi.svg)](https://badge.fury.io/js/@onfido%2Fapi)
![Build Status](https://github.com/{{{ gitUserId }}}/{{{ gitRepoId }}}/actions/workflows/node.yml/badge.svg)
![Build Status](https://github.com/{{ gitUserId }}/{{ gitRepoId }}/actions/workflows/node.yml/badge.svg)

## Installation & Usage

Expand Down Expand Up @@ -162,7 +162,7 @@ onfido.uploadDocument(

### Webhook event verification

{{>README_webhook_verification}}
{{ >README_webhook_verification }}

```js
(async () => {
Expand All @@ -186,4 +186,4 @@ onfido.uploadDocument(

Except for accessing Task object's outputs, avoid using the square bracket syntax (i.e. `[]`) to access undefined properties to prevent breaking changes when these fields appear.

{{>README_footer}}
{{ >README_footer }}

0 comments on commit 90a2f2b

Please sign in to comment.