Skip to content

Commit eb47b9d

Browse files
authored
Fix typos (#20442)
1 parent 29f7c2e commit eb47b9d

File tree

27 files changed

+62
-62
lines changed

27 files changed

+62
-62
lines changed

docs/generators/postgresql-schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2121
|defaultDatabaseName|Database name that will be used for all generated PostgreSQL DDL and DML statements.| ||
2222
|idAutoIncEnabled|If `true`, generates autoincrement PostgreSQL types `SERIAL` and `BIGSERIAL` for `int32` and `int64` respectively for integer fields with name 'id'.| |false|
2323
|identifierNamingConvention|Naming convention of PostgreSQL idebntifiers (table names and column names).|<dl><dt>**snake_case**</dt><dd>Transform named to 'snake_case'.</dd><dt>**original**</dt><dd>Leave original names as in `YAML` file.</dd></dl>|snake_case|
24-
|jsonDataType|Use of PostgreSQL data types for complex model properties.|<dl><dt>**json**</dt><dd>Generate `JSON` fields. Value is stored in `JSON` data type field as human-readable text. Value compliance with JSON standard is checked.</dd><dt>**jsonb**</dt><dd>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.</dd><dt>**off**</dt><dd>Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.</dd></dl>|json|
24+
|jsonDataType|Use of PostgreSQL data types for complex model properties.|<dl><dt>**json**</dt><dd>Generate `JSON` fields. Value is stored in `JSON` data type field as human-readable text. Value compliance with JSON standard is checked.</dd><dt>**jsonb**</dt><dd>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.</dd><dt>**off**</dt><dd>Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.</dd></dl>|json|
2525
|namedParametersEnabled|Generates query examples with named variables in value placeholders (eg.`:name`,`:quantity`) if `true`. Otherwise, generates question marks `?` in value placeholders.| |false|
2626

2727
## IMPORT MAPPING

modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private String getInlineSchemaName(HttpMethod httpVerb, String pathname) {
207207

208208
/**
209209
* Return false if model can be represented by primitives e.g. string, object
210-
* without properties, array or map of other model (model contanier), etc.
210+
* without properties, array or map of other model (model container), etc.
211211
* <p>
212212
* Return true if a model should be generated e.g. object with properties,
213213
* enum, oneOf, allOf, anyOf, etc.
@@ -220,7 +220,7 @@ private boolean isModelNeeded(Schema schema) {
220220

221221
/**
222222
* Return false if model can be represented by primitives e.g. string, object
223-
* without properties, array or map of other model (model contanier), etc.
223+
* without properties, array or map of other model (model container), etc.
224224
* <p>
225225
* Return true if a model should be generated e.g. object with properties,
226226
* enum, oneOf, allOf, anyOf, etc.
@@ -1043,7 +1043,7 @@ private void copyVendorExtensions(Schema source, Schema target) {
10431043
* Add the schemas to the components
10441044
*
10451045
* @param name name of the inline schema
1046-
* @param schema inilne schema
1046+
* @param schema inline schema
10471047
* @return the actual model name (based on inlineSchemaNameMapping if provided)
10481048
*/
10491049
private String addSchemas(String name, Schema schema) {

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ public ModelsMap postProcessModels(ModelsMap objs) {
791791
}
792792

793793
// construct data tag in the template: x-go-datatag
794-
// originl template
794+
// original template
795795
// `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}}`
796796
String goDataTag = "json:\"" + cp.baseName;
797797
if (!cp.required) {

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,10 +1080,10 @@ private String getBeanValidation(Schema<?> items) {
10801080
}
10811081

10821082
if (items.get$ref() != null) {
1083-
Map<String, Schema> shemas = this.openAPI.getComponents().getSchemas();
1083+
Map<String, Schema> schemas = this.openAPI.getComponents().getSchemas();
10841084
String ref = ModelUtils.getSimpleRef(items.get$ref());
10851085
if (ref != null) {
1086-
Schema<?> schema = shemas.get(ref);
1086+
Schema<?> schema = schemas.get(ref);
10871087
if (schema == null || ModelUtils.isObjectSchema(schema)) {
10881088
return "@Valid ";
10891089
}

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public String toVarName(String name) {
435435
}
436436

437437
// translate @ for properties (like @type) to at_.
438-
// Otherwise an additional "type" property will leed to duplcates
438+
// Otherwise an additional "type" property will lead to duplicates
439439
name = name.replaceAll("^@", "at_");
440440

441441
// sanitize name

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1827,7 +1827,7 @@ private PythonType stringType(IJsonSchemaValidationProperties cp) {
18271827
}
18281828
return pt;
18291829
} else {
1830-
if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead
1830+
if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead
18311831
moduleImports.add("pydantic", "SecretStr");
18321832
return new PythonType("SecretStr");
18331833
} else {

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonPydanticV1Codegen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ private String getPydanticType(CodegenParameter cp,
10901090
pydanticImports.add("constr");
10911091
return String.format(Locale.ROOT, "constr(%s)", StringUtils.join(fieldCustomization, ", "));
10921092
} else {
1093-
if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead
1093+
if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead
10941094
pydanticImports.add("SecretStr");
10951095
return "SecretStr";
10961096
} else {
@@ -1375,7 +1375,7 @@ private String getPydanticType(CodegenProperty cp,
13751375
pydanticImports.add("constr");
13761376
return String.format(Locale.ROOT, "constr(%s)", StringUtils.join(fieldCustomization, ", "));
13771377
} else {
1378-
if ("password".equals(cp.getFormat())) { // TDOO avoid using format, use `is` boolean flag instead
1378+
if ("password".equals(cp.getFormat())) { // TODO avoid using format, use `is` boolean flag instead
13791379
pydanticImports.add("SecretStr");
13801380
return "SecretStr";
13811381
} else {

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetServerCodegen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,10 @@ private void setIsFramework() {
804804
additionalProperties.put(TARGET_FRAMEWORK, "netcoreapp" + aspnetCoreVersion);
805805
}
806806

807-
setAddititonalPropertyForFramework();
807+
setAdditionalPropertyForFramework();
808808
}
809809

810-
private void setAddititonalPropertyForFramework() {
810+
private void setAdditionalPropertyForFramework() {
811811
String targetFramework = ((String)additionalProperties.get(TARGET_FRAMEWORK));
812812
if (targetFramework.startsWith("net6.0") ||
813813
targetFramework.startsWith("net7.0") ||

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpFunctionsServerCodegen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,10 @@ private void setAzureFunctionsVersion() {
599599
//set .NET target version
600600
String targetFrameworkVersion = "net" + netCoreVersion.getOptValue();
601601
additionalProperties.put(TARGET_FRAMEWORK, targetFrameworkVersion);
602-
setAddititonalPropertyForFramework();
602+
setAdditionalPropertyForFramework();
603603
}
604604

605-
private void setAddititonalPropertyForFramework() {
605+
private void setAdditionalPropertyForFramework() {
606606
if (((String)additionalProperties.get(TARGET_FRAMEWORK)).startsWith("net6.0")) {
607607
additionalProperties.put(NET_60_OR_LATER, true);
608608
}

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestbedServerCodegen.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,11 @@ private String capitalizeFirstChar(String str) {
302302
}
303303

304304
private String convertPathSegmentToResourceNamePart(String pathSegment) {
305-
String convertedSegnemt = pathSegment;
305+
String convertedSegment = pathSegment;
306306
if (pathSegment.matches(OPEN_API_PATH_PARAM_PATTERN)) {
307-
convertedSegnemt = pathSegment.substring(1, pathSegment.length() - 1);
307+
convertedSegment = pathSegment.substring(1, pathSegment.length() - 1);
308308
}
309-
return capitalizeFirstChar(sanitizeName(convertedSegnemt));
309+
return capitalizeFirstChar(sanitizeName(convertedSegment));
310310
}
311311

312312
private String convertPathParamPattern(String pathSegment) {

0 commit comments

Comments
 (0)