From 2e382077b49d30dc989009ad4ae05522a5f86ebb Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Tue, 15 Oct 2024 15:02:25 +0200 Subject: [PATCH] fix(clients): escape char in comments --- templates/csharp/api.mustache | 4 ++-- templates/csharp/modelEnum.mustache | 2 +- templates/csharp/modelGeneric.mustache | 2 +- templates/csharp/snippets/method.mustache | 2 +- templates/dart/snippets/method.mustache | 2 +- templates/go/snippets/method.mustache | 2 +- templates/java/api.mustache | 8 ++++---- templates/java/snippets/method.mustache | 2 +- templates/javascript/snippets/method.mustache | 2 +- templates/kotlin/snippets/method.mustache | 2 +- templates/php/model.mustache | 2 +- templates/php/snippets/method.mustache | 2 +- templates/python/snippets/method.mustache | 2 +- templates/ruby/api.mustache | 10 +++++----- templates/ruby/snippets/method.mustache | 2 +- templates/scala/enum.mustache | 2 +- templates/scala/snippets/method.mustache | 2 +- templates/swift/model.mustache | 2 +- templates/swift/snippets/method.mustache | 2 +- 19 files changed, 27 insertions(+), 27 deletions(-) diff --git a/templates/csharp/api.mustache b/templates/csharp/api.mustache index 4e096b67eb..1472cd3cb7 100644 --- a/templates/csharp/api.mustache +++ b/templates/csharp/api.mustache @@ -35,7 +35,7 @@ namespace Algolia.Search.Clients; {{/x-acl}} {{/vendorExtensions}} {{#allParams}} - /// {{{description}}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + /// {{{description}}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. @@ -58,7 +58,7 @@ namespace Algolia.Search.Clients; {{/x-acl}} {{/vendorExtensions}} {{#allParams}} - /// {{{description}}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + /// {{{description}}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} {{/allParams}} /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. diff --git a/templates/csharp/modelEnum.mustache b/templates/csharp/modelEnum.mustache index 25579bbca9..71cb02ae19 100644 --- a/templates/csharp/modelEnum.mustache +++ b/templates/csharp/modelEnum.mustache @@ -10,7 +10,7 @@ {{#allowableValues}} {{#enumVars}} /// - /// Enum {{name}} for value: {{value}} + /// Enum {{name}} for value: {{{value}}} /// {{#isString}} {{^useGenericHost}} diff --git a/templates/csharp/modelGeneric.mustache b/templates/csharp/modelGeneric.mustache index f7714ca059..abf0a0cd43 100644 --- a/templates/csharp/modelGeneric.mustache +++ b/templates/csharp/modelGeneric.mustache @@ -126,7 +126,7 @@ /// {{#readWriteVars}} {{#required}} - /// {{description}}{{^description}}{{nameInCamelCase}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. + /// {{{description}}}{{^description}}{{nameInCamelCase}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}}. {{/required}} {{/readWriteVars}} {{#hasOnlyReadOnly}} diff --git a/templates/csharp/snippets/method.mustache b/templates/csharp/snippets/method.mustache index e18afbb8e5..502257a89e 100644 --- a/templates/csharp/snippets/method.mustache +++ b/templates/csharp/snippets/method.mustache @@ -21,7 +21,7 @@ public class Snippet{{client}} /// public async Task SnippetFor{{client}}{{#lambda.pascalcase}}{{method}}{{/lambda.pascalcase}}{{testIndex}}() { - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client {{> snippets/init}} diff --git a/templates/dart/snippets/method.mustache b/templates/dart/snippets/method.mustache index a75e19cf83..bb3b6320fb 100644 --- a/templates/dart/snippets/method.mustache +++ b/templates/dart/snippets/method.mustache @@ -9,7 +9,7 @@ // // {{{description}}} void snippetFor{{method}}{{testIndex}}() async { - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client {{> snippets/init}} diff --git a/templates/go/snippets/method.mustache b/templates/go/snippets/method.mustache index e6cef065e9..8f2b5c4204 100644 --- a/templates/go/snippets/method.mustache +++ b/templates/go/snippets/method.mustache @@ -15,7 +15,7 @@ func SnippetFor{{#lambda.titlecase}}{{method}}{{/lambda.titlecase}}Of{{#lambda.p {{{description}}} */ - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client{{#hasRegionalHost}} with your application region, eg. {{clientPrefix}}.ALGOLIA_APPLICATION_REGION{{/hasRegionalHost}} {{> snippets/init}} diff --git a/templates/java/api.mustache b/templates/java/api.mustache index 7b7466fed1..3a294c5b3f 100644 --- a/templates/java/api.mustache +++ b/templates/java/api.mustache @@ -133,7 +133,7 @@ public class {{classname}} extends ApiClient { {{#operation}} /** * {{{notes}}}{{#allParams}} - * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} + * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} {{#vendorExtensions}}{{#x-is-generic}}* @param innerType The class held by the index, could be your custom class or {@link Object}.{{/x-is-generic}}{{/vendorExtensions}} * @param requestOptions The requestOptions to send along with the query, they will be merged with the transporter requestOptions. {{> api_javadoc}} @@ -145,7 +145,7 @@ public class {{classname}} extends ApiClient { {{! This case only sets `requestOptions` as optional }} /** * {{{notes}}}{{#allParams}} - * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} + * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} {{#vendorExtensions}}{{#x-is-generic}}* @param innerType The class held by the index, could be your custom class or {@link Object}.{{/x-is-generic}}{{/vendorExtensions}} {{> api_javadoc}} public {{> return_type}} {{operationId}}({{#requiredParams}}@Nonnull {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}{{#hasOptionalParams}},{{/hasOptionalParams}}{{/hasRequiredParams}}{{#optionalParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/optionalParams}}{{#vendorExtensions}}{{#x-is-generic}}, Class innerType{{/x-is-generic}}{{/vendorExtensions}}) throws AlgoliaRuntimeException { @@ -180,7 +180,7 @@ public class {{classname}} extends ApiClient { /** * (asynchronously) * {{{notes}}}{{#allParams}} - * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#vendorExtensions}}{{#x-is-generic}} + * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#vendorExtensions}}{{#x-is-generic}} * @param innerType The class held by the index, could be your custom class or {@link Object}.{{/x-is-generic}}{{/vendorExtensions}} * @param requestOptions The requestOptions to send along with the query, they will be merged with the transporter requestOptions. {{> api_javadoc}} @@ -204,7 +204,7 @@ public class {{classname}} extends ApiClient { /** * (asynchronously) * {{{notes}}}{{#allParams}} - * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#vendorExtensions}}{{#x-is-generic}} + * @param {{paramName}} {{{description}}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}{{#vendorExtensions}}{{#x-is-generic}} * @param innerType The class held by the index, could be your custom class or {@link Object}.{{/x-is-generic}}{{/vendorExtensions}} {{> api_javadoc}} public {{> return_type_async}} {{operationId}}Async({{#requiredParams}}@Nonnull {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredParams}}{{#hasRequiredParams}}{{#hasOptionalParams}},{{/hasOptionalParams}}{{/hasRequiredParams}}{{#optionalParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/optionalParams}}{{#vendorExtensions}}{{#x-is-generic}}, Class innerType{{/x-is-generic}}{{/vendorExtensions}}) throws AlgoliaRuntimeException { diff --git a/templates/java/snippets/method.mustache b/templates/java/snippets/method.mustache index f68b39ef05..0f6c9a65de 100644 --- a/templates/java/snippets/method.mustache +++ b/templates/java/snippets/method.mustache @@ -13,7 +13,7 @@ class Snippet{{client}} { // // {{{description}}} void snippetFor{{#lambda.pascalcase}}{{method}}{{/lambda.pascalcase}}{{testIndex}}() throws Exception { - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client {{> snippets/init}} diff --git a/templates/javascript/snippets/method.mustache b/templates/javascript/snippets/method.mustache index ed64a9e8ed..2237ad4b10 100644 --- a/templates/javascript/snippets/method.mustache +++ b/templates/javascript/snippets/method.mustache @@ -11,7 +11,7 @@ import type { RequestOptions } from '@algolia/client-common'; // // {{{description}}} export {{#isAsyncMethod}}async{{/isAsyncMethod}} function snippetFor{{#lambda.pascalcase}}{{method}}{{/lambda.pascalcase}}{{testIndex}}(): {{#isAsyncMethod}}Promise{{/isAsyncMethod}}{{^isAsyncMethod}}void{{/isAsyncMethod}} { - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client // {{#hasRegionalHost}}Replace '{{defaultRegion}}' with your Algolia Application Region{{/hasRegionalHost}} {{> snippets/init}} diff --git a/templates/kotlin/snippets/method.mustache b/templates/kotlin/snippets/method.mustache index 83277347db..8a79adcd93 100644 --- a/templates/kotlin/snippets/method.mustache +++ b/templates/kotlin/snippets/method.mustache @@ -12,7 +12,7 @@ class Snippet{{client}} { {{#blocksRequests}} {{#snippets}} suspend fun snippetFor{{#lambda.pascalcase}}{{method}}{{/lambda.pascalcase}}{{testIndex}}() { - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client {{> snippets/init}} diff --git a/templates/php/model.mustache b/templates/php/model.mustache index 17b93315c2..2d88539ca4 100644 --- a/templates/php/model.mustache +++ b/templates/php/model.mustache @@ -16,7 +16,7 @@ use Algolia\AlgoliaSearch\Model\ModelInterface; * * @category Class {{#description}} - * @description {{.}} + * @description {{{.}}} {{/description}} * @package {{invokerPackage}} */ diff --git a/templates/php/snippets/method.mustache b/templates/php/snippets/method.mustache index 994e1a891e..1f987c822b 100644 --- a/templates/php/snippets/method.mustache +++ b/templates/php/snippets/method.mustache @@ -19,7 +19,7 @@ class Snippet{{client}} */ public function snippetFor{{#lambda.titlecase}}{{method}}{{/lambda.titlecase}}{{testIndex}}(): void { - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client {{> snippets/init}} diff --git a/templates/python/snippets/method.mustache b/templates/python/snippets/method.mustache index 974672250d..87c0b469a7 100644 --- a/templates/python/snippets/method.mustache +++ b/templates/python/snippets/method.mustache @@ -11,7 +11,7 @@ def snippet_for_{{#lambda.snakecase}}{{method}}{{/lambda.snakecase}}{{testIndex} {{{description}}} """ - # >SEPARATOR {{method}} {{testName}} + # >SEPARATOR {{method}} {{{testName}}} # Initialize the client # In an asynchronous context, you can use {{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}} instead, which exposes the exact same methods. {{> snippets/init}} diff --git a/templates/ruby/api.mustache b/templates/ruby/api.mustache index b6a633344c..789a84790d 100644 --- a/templates/ruby/api.mustache +++ b/templates/ruby/api.mustache @@ -77,7 +77,7 @@ module {{moduleName}} {{#operation}} {{#notes}} - # {{.}} + # {{{.}}} {{/notes}} {{#vendorExtensions}} {{#x-acl.0}} @@ -89,10 +89,10 @@ module {{moduleName}} {{/vendorExtensions}} {{#allParams}} {{#required}} - # @param {{paramName}} [{{{dataType}}}] {{description}} (required) + # @param {{paramName}} [{{{dataType}}}] {{{description}}} (required) {{/required}} {{^required}} - # @param {{paramName}} [{{{dataType}}}] {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + # @param {{paramName}} [{{{dataType}}}] {{{description}}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/required}} {{/allParams}} # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) @@ -153,10 +153,10 @@ module {{moduleName}} {{/vendorExtensions}} {{#allParams}} {{#required}} - # @param {{paramName}} [{{{dataType}}}] {{description}} (required) + # @param {{paramName}} [{{{dataType}}}] {{{description}}} (required) {{/required}} {{^required}} - # @param {{paramName}} [{{{dataType}}}] {{description}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} + # @param {{paramName}} [{{{dataType}}}] {{{description}}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} {{/required}} {{/allParams}} # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional) diff --git a/templates/ruby/snippets/method.mustache b/templates/ruby/snippets/method.mustache index 12bb0d2fdf..cd5dc6fd12 100644 --- a/templates/ruby/snippets/method.mustache +++ b/templates/ruby/snippets/method.mustache @@ -9,7 +9,7 @@ # # {{{description}}} def snippet_for_{{#lambda.snakecase}}{{method}}{{/lambda.snakecase}}{{testIndex}} - # >SEPARATOR {{method}} {{testName}} + # >SEPARATOR {{method}} {{{testName}}} # Initialize the client {{> snippets/init}} diff --git a/templates/scala/enum.mustache b/templates/scala/enum.mustache index 5377774ee8..0e715091a2 100644 --- a/templates/scala/enum.mustache +++ b/templates/scala/enum.mustache @@ -9,7 +9,7 @@ object {{classname}} { {{#allowableValues}} {{#values}} case object {{#fnEnumEntry}}{{.}}{{/fnEnumEntry}} extends {{classname}} { - override def toString = "{{.}}" + override def toString = "{{{.}}}" } {{/values}} {{/allowableValues}} diff --git a/templates/scala/snippets/method.mustache b/templates/scala/snippets/method.mustache index bd42066f33..9e3471b9aa 100644 --- a/templates/scala/snippets/method.mustache +++ b/templates/scala/snippets/method.mustache @@ -24,7 +24,7 @@ class Snippet{{client}} { * {{{description}}} */ def snippetFor{{#lambda.pascalcase}}{{client}}{{/lambda.pascalcase}}{{#lambda.pascalcase}}{{method}}{{/lambda.pascalcase}}{{testIndex}}(): Unit = { - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client {{> snippets/init}} diff --git a/templates/swift/model.mustache b/templates/swift/model.mustache index cc32ea4ef9..cb062b6489 100644 --- a/templates/swift/model.mustache +++ b/templates/swift/model.mustache @@ -7,7 +7,7 @@ import Foundation {{#description}} -/** {{.}} */{{/description}}{{#isDeprecated}} +/** {{{.}}} */{{/description}}{{#isDeprecated}} @available(*, deprecated, message: "This schema is deprecated."){{/isDeprecated}}{{#vendorExtensions.x-is-one-of-interface}} {{> modelOneOf}}{{/vendorExtensions.x-is-one-of-interface}}{{^vendorExtensions.x-is-one-of-interface}}{{#isArray}} {{> modelArray}}{{/isArray}}{{^isArray}}{{#isEnum}} diff --git a/templates/swift/snippets/method.mustache b/templates/swift/snippets/method.mustache index 077e02084e..2c22ffb8c5 100644 --- a/templates/swift/snippets/method.mustache +++ b/templates/swift/snippets/method.mustache @@ -12,7 +12,7 @@ final class {{client}}Snippet { // // {{{description}}} func snippetFor{{#lambda.pascalcase}}{{method}}{{/lambda.pascalcase}}{{testIndex}}() async throws { - // >SEPARATOR {{method}} {{testName}} + // >SEPARATOR {{method}} {{{testName}}} // Initialize the client {{> snippets/init}}