Skip to content

Commit c5efc6a

Browse files
committed
Fix minor typos
1 parent c5ac7d4 commit c5efc6a

File tree

357 files changed

+1051
-1051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

357 files changed

+1051
-1051
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ after_success:
201201
echo "Pushed to $DOCKER_CODEGEN_CLI_IMAGE_NAME";
202202
fi;
203203
fi;
204-
## NOTE; we will do the followign manually instead as the page doesn't need to be updated in every single travis build
204+
## NOTE; we will do the following manually instead as the page doesn't need to be updated in every single travis build
205205
## publish latest website, variables below are secure environment variables which are unavailable to PRs from forks.
206206
# - if [ "$TRAVIS_BRANCH" = "master" ] && [ -z $TRAVIS_TAG ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
207207
# sed -i "s/Vector{UInt8}/Vector\{UInt8\}/g" docs/generators/julia-client.md;

bin/utils/test_file_list.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java"
1111
sha256: 325fdd5d7e2c97790c0fb44f712ab7b2ba022d7e1a5b0056f47b07f342682b6d
1212
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java"
13-
sha256: e673d9928c8eb848262d0116fe0d28db832e128671a810a7c966d06d90cb9b63
13+
sha256: 44aef898ae3f5ac75e3847aa24a8eca259eb922be920162df0b725a6b751a6ca
1414
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java"
1515
sha256: 8b1b8f2a2ad00ccb090873a94a5f73e328b98317d2ec715f53bd7a1accb2a023
1616
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java"

docs/generators/postgresql-schema.md

+1-1
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

docs/generators/swift5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5656
|useCustomDateWithoutTime|Uses a custom type to decode and encode dates without time information to support OpenAPIs date format (default: false)| |false|
5757
|useJsonEncodable|Make models conform to JSONEncodable protocol (default: true)| |true|
5858
|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null|
59-
|validatable|Make validation rules and validator for model properies (default: true)| |true|
59+
|validatable|Make validation rules and validator for model properties (default: true)| |true|
6060

6161
## IMPORT MAPPING
6262

docs/generators/swift6.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
5858
|useCustomDateWithoutTime|Uses a custom type to decode and encode dates without time information to support OpenAPIs date format (default: false)| |false|
5959
|useJsonEncodable|Make models conform to JSONEncodable protocol (default: true)| |true|
6060
|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: true).| |null|
61-
|validatable|Make validation rules and validator for model properies (default: true)| |true|
61+
|validatable|Make validation rules and validator for model properties (default: true)| |true|
6262

6363
## IMPORT MAPPING
6464

modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public class Generate extends OpenApiGeneratorCommand {
162162

163163
@Option(
164164
name = {"--openapi-generator-ignore-list"},
165-
title = ".openapi-generaotr-ignore list",
165+
title = ".openapi-generator-ignore list",
166166
description = "specifies entries in the .openapi-generator-ignore file relative/path/to/file1,relative/path/to/file2. For example: README.md,pom.xml"
167167
+ " You can also have multiple occurrences of this option.")
168168
private List<String> openapiGeneratorIgnoreList = new ArrayList<>();

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -7915,7 +7915,7 @@ public CodegenParameter fromRequestBody(RequestBody body, Set<String> imports, S
79157915
if (original.getMinimum() != null) {
79167916
codegenParameter.setMinimum(String.valueOf(original.getMinimum().doubleValue()));
79177917
}
7918-
/* comment out below as we don't store `title` in the codegen parametera the moment
7918+
/* comment out below as we don't store `title` in the codegen parameter at the moment
79197919
if (original.getTitle() != null) {
79207920
codegenParameter.setTitle(original.getTitle());
79217921
}

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

+4-4
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.
@@ -629,7 +629,7 @@ private void flattenComponentResponses() {
629629
* breed:
630630
* type: string
631631
*
632-
* @param key a unique name ofr the composed schema.
632+
* @param key a unique name for the composed schema.
633633
* @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf).
634634
* @param skipAllOfInlineSchemas true if allOf inline schemas need to be skipped.
635635
*/
@@ -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/OpenAPINormalizer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ private Schema normalizeComplexComposedSchema(Schema schema, Set<Schema> visited
836836
}
837837

838838
// ===================== a list of rules =====================
839-
// all rules (functions ) start with the word "process"
839+
// all rules (functions) start with the word "process"
840840

841841
/**
842842
* Child schemas in `allOf` is considered a parent if it's a `$ref` (instead of inline schema).

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

+1-1
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

+3-3
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ private boolean startsWithTwoUppercaseLetters(String name) {
936936

937937
@Override
938938
public String toParamName(String name) {
939-
// obtain the name from parameterNameMapping directly if provided
939+
// obtain the name from parameterNameMapping directly if provided
940940
if (parameterNameMapping.containsKey(name)) {
941941
return parameterNameMapping.get(name);
942942
}
@@ -1077,10 +1077,10 @@ private String getBeanValidation(Schema<?> items) {
10771077
}
10781078

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

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

+1-1
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

+1-1
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

+2-2
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

+2-2
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

+2-2
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

+3-3
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) {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ private boolean isKtor2Or3() {
452452
/**
453453
* Returns true if latest version of ktor is used.
454454
*
455-
* @return true if latest veresion of ktor is used.
455+
* @return true if latest version of ktor is used.
456456
*/
457457
private boolean isKtor() {
458458
return Constants.KTOR.equals(library);

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public PostgresqlSchemaCodegen() {
313313
"Use of PostgreSQL data types for complex model properties.");
314314
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.")
315315
.addEnum("jsonb",
316-
"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.")
316+
"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.")
317317
.addEnum("off", "Generate `TEXT` fields. Just store the value as plain text. Value compliance with JSON standard is not checked.")
318318
.setDefault("json");
319319
cliOptions.add(jsonDataTypeOpt);

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ public ParamPart(String name, CodegenParameter param) {
460460
* {{{
461461
*
462462
* @cask.get("/user", subpath = true)
463-
* def userRouteDescriminator(request: cask.Request) = {
463+
* def userRouteDiscriminator(request: cask.Request) = {
464464
* request.remainingPathSegments match {
465465
* case Seq("logout") => logoutUser(request)
466466
* case Seq("login") => loginUser(request)
@@ -758,7 +758,7 @@ private static boolean doesNotNeedMapping(final CodegenProperty p, final Set<Str
758758
// ermph. Apparently 'isPrimitive' can be false while 'isNumeric' is true.
759759

760760
/*
761-
* if dataType == Value then it doesn't need mapping -- this can happen with properties like ths:
761+
* if dataType == Value then it doesn't need mapping -- this can happen with properties like this:
762762
* {{{
763763
* example:
764764
* items: {}
@@ -1179,7 +1179,7 @@ private static String queryArgs(final CodegenOperation op) {
11791179
* <p>
11801180
* The data variant can have nulls and other non-scala things, but they know how to create validated model objects.
11811181
* <p>
1182-
* This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data varients.
1182+
* This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data variants.
11831183
* <p>
11841184
* e.g. consider this example:
11851185
* ```

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> objs)
383383
return modelsMap;
384384
}
385385

386-
private Map<String, Object> makeRefiined(Set<String> imports, String dataType, ArrayList<String> refined) {
386+
private Map<String, Object> makeRefined(Set<String> imports, String dataType, ArrayList<String> refined) {
387387
Map<String, Object> vendorExtensions = new HashMap<>();
388388
if (!refined.isEmpty()) {
389389
imports.add("And");
@@ -426,7 +426,7 @@ private Map<String, Object> refineProp(IJsonSchemaValidationProperties prop, Set
426426
} catch (IndexOutOfBoundsException ignored) {
427427
}
428428
}
429-
vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined));
429+
vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined));
430430
}
431431

432432
if ("Int".equals(prop.getDataType())
@@ -455,7 +455,7 @@ private Map<String, Object> refineProp(IJsonSchemaValidationProperties prop, Set
455455
imports.add("LessEqual");
456456
}
457457
}
458-
vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined));
458+
vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined));
459459
}
460460

461461
if (prop.getIsUuid() || "Uuid".equals(prop.getDataType())) {
@@ -476,7 +476,7 @@ private Map<String, Object> refineProp(IJsonSchemaValidationProperties prop, Set
476476
imports.add("MaxSize");
477477
}
478478

479-
vendorExtensions.putAll(makeRefiined(imports, prop.getDataType(), refined));
479+
vendorExtensions.putAll(makeRefined(imports, prop.getDataType(), refined));
480480
}
481481

482482
return vendorExtensions;

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ private Set<String> reformatProvideArgsParams(Operation operation) {
10731073
if (argObj instanceof List) {
10741074
List<String> provideArgs = (List<String>) argObj;
10751075
if (!provideArgs.isEmpty()) {
1076-
List<String> formatedArgs = new ArrayList<>();
1076+
List<String> formattedArgs = new ArrayList<>();
10771077
for (String oneArg : provideArgs) {
10781078
if (StringUtils.isNotEmpty(oneArg)) {
10791079
String regexp = "(?<AnnotationTag>@)?(?<ClassPath>(?<PackageName>(\\w+\\.)*)(?<ClassName>\\w+))(?<Params>\\(.*?\\))?\\s?";
@@ -1095,10 +1095,10 @@ private Set<String> reformatProvideArgsParams(Operation operation) {
10951095
}
10961096
String newArg = String.join(" ", newArgs);
10971097
LOGGER.trace("new arg {} {}", newArg);
1098-
formatedArgs.add(newArg);
1098+
formattedArgs.add(newArg);
10991099
}
11001100
}
1101-
operation.getExtensions().put("x-spring-provide-args", formatedArgs);
1101+
operation.getExtensions().put("x-spring-provide-args", formattedArgs);
11021102
}
11031103
}
11041104
return provideArgsClassSet;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public Swift5ClientCodegen() {
322322
.defaultValue(Boolean.FALSE.toString()));
323323

324324
cliOptions.add(new CliOption(VALIDATABLE,
325-
"Make validation rules and validator for model properies (default: true)")
325+
"Make validation rules and validator for model properties (default: true)")
326326
.defaultValue(Boolean.TRUE.toString()));
327327

328328
supportedLibraries.put(LIBRARY_URLSESSION, "[DEFAULT] HTTP client: URLSession");

0 commit comments

Comments
 (0)