diff --git a/docs/generators/postgresql-schema.md b/docs/generators/postgresql-schema.md index b4959234ae6..ee85c7e680e 100644 --- a/docs/generators/postgresql-schema.md +++ b/docs/generators/postgresql-schema.md @@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |defaultDatabaseName|Database name that will be used for all generated PostgreSQL DDL and DML statements.| || |idAutoIncEnabled|If `true`, generates autoincrement PostgreSQL types `SERIAL` and `BIGSERIAL` for `int32` and `int64` respectively for integer fields with name 'id'.| |false| |identifierNamingConvention|Naming convention of PostgreSQL idebntifiers (table names and column names).|
**snake_case**
Transform named to 'snake_case'.
**original**
Leave original names as in `YAML` file.
|snake_case| -|jsonDataType|Use of PostgreSQL data types for complex model properties.|
**json**
Generate `JSON` fields. Value is stored in `JSON` data type field as human-readable text. Value compliance with JSON standard is checked.
**jsonb**
Generate `JSONB` fields. Value is stored in `JSONB` data type field in binary format. `JSONB` data type is generally nore efficient than `JSON` but it is not human-readable. Value compliance with JSON standard is checked.
**off**
Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.
|json| +|jsonDataType|Use of PostgreSQL data types for complex model properties.|
**json**
Generate `JSON` fields. Value is stored in `JSON` data type field as human-readable text. Value compliance with JSON standard is checked.
**jsonb**
Generate `JSONB` fields. Value is stored in `JSONB` data type field in binary format. `JSONB` data type is generally more efficient than `JSON` but it is not human-readable. Value compliance with JSON standard is checked.
**off**
Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.
|json| |namedParametersEnabled|Generates query examples with named variables in value placeholders (eg.`:name`,`:quantity`) if `true`. Otherwise, generates question marks `?` in value placeholders.| |false| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index 8cdf045a424..e45cc3df9b9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -207,7 +207,7 @@ public class InlineModelResolver { /** * Return false if model can be represented by primitives e.g. string, object - * without properties, array or map of other model (model contanier), etc. + * without properties, array or map of other model (model container), etc. *

* Return true if a model should be generated e.g. object with properties, * enum, oneOf, allOf, anyOf, etc. @@ -220,7 +220,7 @@ public class InlineModelResolver { /** * Return false if model can be represented by primitives e.g. string, object - * without properties, array or map of other model (model contanier), etc. + * without properties, array or map of other model (model container), etc. *

* Return true if a model should be generated e.g. object with properties, * enum, oneOf, allOf, anyOf, etc. @@ -1043,7 +1043,7 @@ public class InlineModelResolver { * Add the schemas to the components * * @param name name of the inline schema - * @param schema inilne schema + * @param schema inline schema * @return the actual model name (based on inlineSchemaNameMapping if provided) */ private String addSchemas(String name, Schema schema) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index 3bc48fb57de..cdec5424ca8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -791,7 +791,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } // construct data tag in the template: x-go-datatag - // originl template + // original template // `json:"{{{baseName}}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{{baseName}}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#withValidate}} validate:"{{validate}}"{{/withValidate}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}` String goDataTag = "json:\"" + cp.baseName; if (!cp.required) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index a3aef4be97a..4c364a50725 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -1080,10 +1080,10 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code } if (items.get$ref() != null) { - Map shemas = this.openAPI.getComponents().getSchemas(); + Map schemas = this.openAPI.getComponents().getSchemas(); String ref = ModelUtils.getSimpleRef(items.get$ref()); if (ref != null) { - Schema schema = shemas.get(ref); + Schema schema = schemas.get(ref); if (schema == null || ModelUtils.isObjectSchema(schema)) { return "@Valid "; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index b850b6bffc8..43cc08e3dfc 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -435,7 +435,7 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg } // translate @ for properties (like @type) to at_. - // Otherwise an additional "type" property will leed to duplcates + // Otherwise an additional "type" property will lead to duplicates name = name.replaceAll("^@", "at_"); // sanitize name diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java index f6813081563..9fa261694f6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java @@ -1827,7 +1827,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co } return pt; } else { - if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead + if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead moduleImports.add("pydantic", "SecretStr"); return new PythonType("SecretStr"); } else { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java index c697bc8f234..ec629c1ce6c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java @@ -1090,7 +1090,7 @@ public abstract class AbstractPythonPydanticV1Codegen extends DefaultCodegen imp pydanticImports.add("constr"); return String.format(Locale.ROOT, "constr(%s)", StringUtils.join(fieldCustomization, ", ")); } else { - if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead + if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead pydanticImports.add("SecretStr"); return "SecretStr"; } else { @@ -1375,7 +1375,7 @@ public abstract class AbstractPythonPydanticV1Codegen extends DefaultCodegen imp pydanticImports.add("constr"); return String.format(Locale.ROOT, "constr(%s)", StringUtils.join(fieldCustomization, ", ")); } else { - if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead + if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead pydanticImports.add("SecretStr"); return "SecretStr"; } else { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java index 5a0f5e5d9af..12c39f9f3d9 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java @@ -804,10 +804,10 @@ public class AspNetServerCodegen extends AbstractCSharpCodegen { additionalProperties.put(TARGET_FRAMEWORK, "netcoreapp" + aspnetCoreVersion); } - setAddititonalPropertyForFramework(); + setAdditionalPropertyForFramework(); } - private void setAddititonalPropertyForFramework() { + private void setAdditionalPropertyForFramework() { String targetFramework = ((String)additionalProperties.get(TARGET_FRAMEWORK)); if (targetFramework.startsWith("net6.0") || targetFramework.startsWith("net7.0") || diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java index 4871f6d44fd..61f4ef6bae8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java @@ -599,10 +599,10 @@ public class CSharpFunctionsServerCodegen extends AbstractCSharpCodegen { //set .NET target version String targetFrameworkVersion = "net" + netCoreVersion.getOptValue(); additionalProperties.put(TARGET_FRAMEWORK, targetFrameworkVersion); - setAddititonalPropertyForFramework(); + setAdditionalPropertyForFramework(); } - private void setAddititonalPropertyForFramework() { + private void setAdditionalPropertyForFramework() { if (((String)additionalProperties.get(TARGET_FRAMEWORK)).startsWith("net6.0")) { additionalProperties.put(NET_60_OR_LATER, true); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java index 55d383a6b26..8b5d2fa3d12 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java @@ -302,11 +302,11 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { } private String convertPathSegmentToResourceNamePart(String pathSegment) { - String convertedSegnemt = pathSegment; + String convertedSegment = pathSegment; if (pathSegment.matches(OPEN_API_PATH_PARAM_PATTERN)) { - convertedSegnemt = pathSegment.substring(1, pathSegment.length() - 1); + convertedSegment = pathSegment.substring(1, pathSegment.length() - 1); } - return capitalizeFirstChar(sanitizeName(convertedSegnemt)); + return capitalizeFirstChar(sanitizeName(convertedSegment)); } private String convertPathParamPattern(String pathSegment) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java index 57f8a1961ef..7ce5f76ce16 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java @@ -452,7 +452,7 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen implements BeanVa /** * Returns true if latest version of ktor is used. * - * @return true if latest veresion of ktor is used. + * @return true if latest version of ktor is used. */ private boolean isKtor() { return Constants.KTOR.equals(library); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostgresqlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostgresqlSchemaCodegen.java index 5910be7699a..b3ecedfd4b8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostgresqlSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PostgresqlSchemaCodegen.java @@ -313,7 +313,7 @@ public class PostgresqlSchemaCodegen extends DefaultCodegen { "Use of PostgreSQL data types for complex model properties."); jsonDataTypeOpt.addEnum("json", "Generate `JSON` fields. Value is stored in `JSON` data type field as human-readable text. Value compliance with JSON standard is checked.") .addEnum("jsonb", - "Generate `JSONB` fields. Value is stored in `JSONB` data type field in binary format. `JSONB` data type is generally nore efficient than `JSON` but it is not human-readable. Value compliance with JSON standard is checked.") + "Generate `JSONB` fields. Value is stored in `JSONB` data type field in binary format. `JSONB` data type is generally more efficient than `JSON` but it is not human-readable. Value compliance with JSON standard is checked.") .addEnum("off", "Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.") .setDefault("json"); cliOptions.add(jsonDataTypeOpt); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java index 9339370f286..426b336966c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaCaskServerCodegen.java @@ -460,7 +460,7 @@ public class ScalaCaskServerCodegen extends AbstractScalaCodegen implements Code * {{{ * * @cask.get("/user", subpath = true) - * def userRouteDescriminator(request: cask.Request) = { + * def userRouteDiscriminator(request: cask.Request) = { * request.remainingPathSegments match { * case Seq("logout") => logoutUser(request) * case Seq("login") => loginUser(request) @@ -758,7 +758,7 @@ public class ScalaCaskServerCodegen extends AbstractScalaCodegen implements Code // ermph. Apparently 'isPrimitive' can be false while 'isNumeric' is true. /* - * if dataType == Value then it doesn't need mapping -- this can happen with properties like ths: + * if dataType == Value then it doesn't need mapping -- this can happen with properties like this: * {{{ * example: * items: {} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttp4sServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttp4sServerCodegen.java index 59dc936667d..44711d8e1c3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttp4sServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaHttp4sServerCodegen.java @@ -383,7 +383,7 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC return modelsMap; } - private Map makeRefiined(Set imports, String dataType, ArrayList refined) { + private Map makeRefined(Set imports, String dataType, ArrayList refined) { Map vendorExtensions = new HashMap<>(); if (!refined.isEmpty()) { imports.add("And"); @@ -426,7 +426,7 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC } catch (IndexOutOfBoundsException ignored) { } } - vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined)); + vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined)); } if ("Int".equals(prop.getDataType()) @@ -455,7 +455,7 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC imports.add("LessEqual"); } } - vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined)); + vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined)); } if (prop.getIsUuid() || "Uuid".equals(prop.getDataType())) { @@ -476,7 +476,7 @@ public class ScalaHttp4sServerCodegen extends DefaultCodegen implements CodegenC imports.add("MaxSize"); } - vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined)); + vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined)); } return vendorExtensions; diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index 309ee2fc321..366e3689df7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -280,7 +280,7 @@ public class {{classname}} { {{! The `available` method would work with a `PushbackInputStream`, because we could read 1 byte to check if it exists then push it back so Jackson can read it again. The issue with that is that it will also insert an ascii character for "head of input" and that will break Jackson as it does not handle special whitespace characters. }} {{! A fix for that problem is to read it into a string and remove those characters, but if we need to read it before giving it to jackson to fix the string then just reading it into a string as is to do an emptiness check is the cleaner solution. }} {{! We could also manipulate the inputstream to remove that bad character, but string manipulation is easier to read and this codepath is not asyncronus so we do not gain anything by reading the stream later. }} - {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a syncronus client is already not the right tool for that.}} + {{! This fix does make it unsuitable for large amounts of data because `InputStream.readAllbytes` is not meant for it, but a synchronous client is already not the right tool for that.}} if (localVarResponse.body() == null) { return new ApiResponse<{{{returnType}}}>( localVarResponse.statusCode(), diff --git a/modules/openapi-generator/src/main/resources/csharp-functions/JsonSubTypesTests.mustache b/modules/openapi-generator/src/main/resources/csharp-functions/JsonSubTypesTests.mustache index 9b1f66624d7..55b1d51837d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-functions/JsonSubTypesTests.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-functions/JsonSubTypesTests.mustache @@ -17,17 +17,17 @@ namespace {{packageName}}.Test.Client [Test] public void TestSimpleJsonSubTypesExample() { - var annimal = + var animal = JsonConvert.DeserializeObject("{\"Kind\":\"Dog\",\"Breed\":\"Jack Russell Terrier\"}"); - Assert.AreEqual("Jack Russell Terrier", (annimal as Dog)?.Breed); + Assert.AreEqual("Jack Russell Terrier", (animal as Dog)?.Breed); } [Test] public void DeserializeObjectWithCustomMapping() { - var annimal = + var animal = JsonConvert.DeserializeObject("{\"Sound\":\"Bark\",\"Breed\":\"Jack Russell Terrier\"}"); - Assert.AreEqual("Jack Russell Terrier", (annimal as Dog2)?.Breed); + Assert.AreEqual("Jack Russell Terrier", (animal as Dog2)?.Breed); } [Test] diff --git a/modules/openapi-generator/src/main/resources/gdscript/model.handlebars b/modules/openapi-generator/src/main/resources/gdscript/model.handlebars index 1eeb8a0479c..199d4d27b55 100644 --- a/modules/openapi-generator/src/main/resources/gdscript/model.handlebars +++ b/modules/openapi-generator/src/main/resources/gdscript/model.handlebars @@ -43,7 +43,7 @@ {{/if}} __{{name}}__was__set = true {{name}} = value -{{! Flag used to only serialize what has been explicitely set. (no nullable types, anyway null might be legit) }} +{{! Flag used to only serialize what has been explicitly set. (no nullable types, anyway null might be legit) }} var __{{name}}__was__set := false {{! Store the allowed values if the property is an enum }} {{#if isEnum}} diff --git a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache index ec5d8c742f6..4a0e8baf409 100644 --- a/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache +++ b/modules/openapi-generator/src/main/resources/htmlDocs2/index.mustache @@ -111,10 +111,10 @@ } else { // Use a for loop instead of forEach to avoid nested functions // Otherwise "return" will not work properly - for(var propt in currentNode){ - if (currentNode.hasOwnProperty(propt)) { - currentChild = currentNode[propt] - if (id == propt) { + for(var prompt in currentNode){ + if (currentNode.hasOwnProperty(prompt)) { + currentChild = currentNode[prompt] + if (id == prompt) { return currentChild; } else { // Search in the current child diff --git a/modules/openapi-generator/src/main/resources/php/libraries/psr-18/ApiException.mustache b/modules/openapi-generator/src/main/resources/php/libraries/psr-18/ApiException.mustache index e3f055abafb..c3ea7ad7f5c 100644 --- a/modules/openapi-generator/src/main/resources/php/libraries/psr-18/ApiException.mustache +++ b/modules/openapi-generator/src/main/resources/php/libraries/psr-18/ApiException.mustache @@ -90,7 +90,7 @@ class ApiException extends RequestException } /** - * Sets the deseralized response object (during deserialization) + * Sets the deserialized response object (during deserialization) * * @param mixed $obj Deserialized response object * @@ -102,7 +102,7 @@ class ApiException extends RequestException } /** - * Gets the deseralized response object (during deserialization) + * Gets the deserialized response object (during deserialization) * * @return mixed the deserialized response object */ diff --git a/modules/openapi-generator/src/main/resources/r/api_client.mustache b/modules/openapi-generator/src/main/resources/r/api_client.mustache index 72287876e96..2a50b0263bd 100644 --- a/modules/openapi-generator/src/main/resources/r/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_client.mustache @@ -437,7 +437,7 @@ ApiClient <- R6::R6Class( #' #' @param local_var_resp The API response #' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is. - #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne. + #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response. DeserializeResponse = function(local_var_resp, return_type = NULL) { text <- local_var_resp$response_as_text() if (is.na(text)) { @@ -454,8 +454,8 @@ ApiClient <- R6::R6Class( #' The function will write out data. #' #' 1. If binary data is detected it will use `writeBin` - #' 2. If the raw response is coercable to text, the text will be written to a file - #' 3. If the raw response is not coercable to text, the raw response will be written + #' 2. If the raw response is coercible to text, the text will be written to a file + #' 3. If the raw response is not coercible to text, the raw response will be written #' #' @param local_var_resp The API response #' @param file The name of the data file to save the result diff --git a/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache b/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache index 194083b2d38..3020d69ff82 100644 --- a/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache @@ -450,7 +450,7 @@ ApiClient <- R6::R6Class( #' #' @param local_var_resp The API response #' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is. - #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne. + #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response. DeserializeResponse = function(local_var_resp, return_type = NULL) { text <- local_var_resp$response_as_text() if (is.na(text)) { @@ -467,8 +467,8 @@ ApiClient <- R6::R6Class( #' The function will write out data. #' #' 1. If binary data is detected it will use `writeBin` - #' 2. If the raw response is coercable to text, the text will be written to a file - #' 3. If the raw response is not coercable to text, the raw response will be written + #' 2. If the raw response is coercible to text, the text will be written to a file + #' 3. If the raw response is not coercible to text, the raw response will be written #' #' @param local_var_resp The API response #' @param file The name of the data file to save the result diff --git a/samples/client/echo_api/r/R/api_client.R b/samples/client/echo_api/r/R/api_client.R index ab9094f67da..78edd45d748 100644 --- a/samples/client/echo_api/r/R/api_client.R +++ b/samples/client/echo_api/r/R/api_client.R @@ -389,7 +389,7 @@ ApiClient <- R6::R6Class( #' #' @param local_var_resp The API response #' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is. - #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne. + #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response. DeserializeResponse = function(local_var_resp, return_type = NULL) { text <- local_var_resp$response_as_text() if (is.na(text)) { @@ -406,8 +406,8 @@ ApiClient <- R6::R6Class( #' The function will write out data. #' #' 1. If binary data is detected it will use `writeBin` - #' 2. If the raw response is coercable to text, the text will be written to a file - #' 3. If the raw response is not coercable to text, the raw response will be written + #' 2. If the raw response is coercible to text, the text will be written to a file + #' 3. If the raw response is not coercible to text, the raw response will be written #' #' @param local_var_resp The API response #' @param file The name of the data file to save the result diff --git a/samples/client/petstore/R-httr2-wrapper/R/api_client.R b/samples/client/petstore/R-httr2-wrapper/R/api_client.R index f89465e25bb..954f772e391 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/api_client.R +++ b/samples/client/petstore/R-httr2-wrapper/R/api_client.R @@ -439,7 +439,7 @@ ApiClient <- R6::R6Class( #' #' @param local_var_resp The API response #' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is. - #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne. + #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response. DeserializeResponse = function(local_var_resp, return_type = NULL) { text <- local_var_resp$response_as_text() if (is.na(text)) { @@ -456,8 +456,8 @@ ApiClient <- R6::R6Class( #' The function will write out data. #' #' 1. If binary data is detected it will use `writeBin` - #' 2. If the raw response is coercable to text, the text will be written to a file - #' 3. If the raw response is not coercable to text, the raw response will be written + #' 2. If the raw response is coercible to text, the text will be written to a file + #' 3. If the raw response is not coercible to text, the raw response will be written #' #' @param local_var_resp The API response #' @param file The name of the data file to save the result diff --git a/samples/client/petstore/R-httr2/R/api_client.R b/samples/client/petstore/R-httr2/R/api_client.R index f89465e25bb..954f772e391 100644 --- a/samples/client/petstore/R-httr2/R/api_client.R +++ b/samples/client/petstore/R-httr2/R/api_client.R @@ -439,7 +439,7 @@ ApiClient <- R6::R6Class( #' #' @param local_var_resp The API response #' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is. - #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne. + #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response. DeserializeResponse = function(local_var_resp, return_type = NULL) { text <- local_var_resp$response_as_text() if (is.na(text)) { @@ -456,8 +456,8 @@ ApiClient <- R6::R6Class( #' The function will write out data. #' #' 1. If binary data is detected it will use `writeBin` - #' 2. If the raw response is coercable to text, the text will be written to a file - #' 3. If the raw response is not coercable to text, the raw response will be written + #' 2. If the raw response is coercible to text, the text will be written to a file + #' 3. If the raw response is not coercible to text, the raw response will be written #' #' @param local_var_resp The API response #' @param file The name of the data file to save the result diff --git a/samples/client/petstore/R/R/api_client.R b/samples/client/petstore/R/R/api_client.R index c9e67c31741..561b7fae7f0 100644 --- a/samples/client/petstore/R/R/api_client.R +++ b/samples/client/petstore/R/R/api_client.R @@ -418,7 +418,7 @@ ApiClient <- R6::R6Class( #' #' @param local_var_resp The API response #' @param return_type The target return type for the endpoint (e.g., `"object"`). If `NULL` text will be left as-is. - #' @return If the raw response is corecable to text, return the text. Otherwise return the raw resposne. + #' @return If the raw response is corecable to text, return the text. Otherwise return the raw response. DeserializeResponse = function(local_var_resp, return_type = NULL) { text <- local_var_resp$response_as_text() if (is.na(text)) { @@ -435,8 +435,8 @@ ApiClient <- R6::R6Class( #' The function will write out data. #' #' 1. If binary data is detected it will use `writeBin` - #' 2. If the raw response is coercable to text, the text will be written to a file - #' 3. If the raw response is not coercable to text, the raw response will be written + #' 2. If the raw response is coercible to text, the text will be written to a file + #' 3. If the raw response is not coercible to text, the raw response will be written #' #' @param local_var_resp The API response #' @param file The name of the data file to save the result diff --git a/samples/client/petstore/php/psr-18/lib/ApiException.php b/samples/client/petstore/php/psr-18/lib/ApiException.php index fcff01db917..c4c3ee0d1aa 100644 --- a/samples/client/petstore/php/psr-18/lib/ApiException.php +++ b/samples/client/petstore/php/psr-18/lib/ApiException.php @@ -99,7 +99,7 @@ class ApiException extends RequestException } /** - * Sets the deseralized response object (during deserialization) + * Sets the deserialized response object (during deserialization) * * @param mixed $obj Deserialized response object * @@ -111,7 +111,7 @@ class ApiException extends RequestException } /** - * Gets the deseralized response object (during deserialization) + * Gets the deserialized response object (during deserialization) * * @return mixed the deserialized response object */ diff --git a/samples/documentation/html2/index.html b/samples/documentation/html2/index.html index 1f7b7b1cf7e..5846a550fc3 100644 --- a/samples/documentation/html2/index.html +++ b/samples/documentation/html2/index.html @@ -163,10 +163,10 @@ h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify" } else { // Use a for loop instead of forEach to avoid nested functions // Otherwise "return" will not work properly - for(var propt in currentNode){ - if (currentNode.hasOwnProperty(propt)) { - currentChild = currentNode[propt] - if (id == propt) { + for(var prompt in currentNode){ + if (currentNode.hasOwnProperty(prompt)) { + currentChild = currentNode[prompt] + if (id == prompt) { return currentChild; } else { // Search in the current child