Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor typos everywhere #19470

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0, 3.1 (beta support)

For old releases, please refer to the [**Release**](https://github.com/OpenAPITools/openapi-generator/releases) page.

For decomissioned generators/libraries/frameworks, please refer to [the "Decommission" label](https://github.com/OpenAPITools/openapi-generator/issues?q=label%3ADecommission+is%3Amerged+) in the pull request page.
For decommissioned generators/libraries/frameworks, please refer to [the "Decommission" label](https://github.com/OpenAPITools/openapi-generator/issues?q=label%3ADecommission+is%3Amerged+) in the pull request page.

## [1.2 - Artifacts on Maven Central](#table-of-contents)

Expand Down
2 changes: 1 addition & 1 deletion bin/utils/test_file_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ClientTest.java"
sha256: 325fdd5d7e2c97790c0fb44f712ab7b2ba022d7e1a5b0056f47b07f342682b6d
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java"
sha256: e673d9928c8eb848262d0116fe0d28db832e128671a810a7c966d06d90cb9b63
sha256: 44aef898ae3f5ac75e3847aa24a8eca259eb922be920162df0b725a6b751a6ca
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java"
sha256: 0d64cdc11809a7b5b952ccdad2bd91bd0045b3894d6fabf3e368fa0be12b8217
- filename: "samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java"
Expand Down
2 changes: 1 addition & 1 deletion docs/3.0.0-release-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sidebar_label: "Release Notes: 3.0.0"
* e58dc2c77 Fix COPY in Dockerfile (#64)
* 9d7feaaeb Fix online generator (docker push) (#58)
* 9247cd01e Changes for Docker
* 64037ee59 update docker-related files to ues jdk8
* 64037ee59 update docker-related files to use jdk8

* ## Plug-ins
* b6b8c0db8 \[gradle-plugin] Initial implementation (#162)
Expand Down
12 changes: 6 additions & 6 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Upon first code generation, you may also pass the CLI option `--ignore-file-over

Editor support for `.openapi-generator-ignore` files is available in IntelliJ via the [.ignore plugin](https://plugins.jetbrains.com/plugin/7495--ignore).

One may want to pre-populate `.openapi-generator-ignore` with a list of entries during the code generation process and the global/general option `openapiGeneatorIgnoreList` (e.g. --openapi-generator-ignore-list in CLI) can do exactly that. For example,
One may want to pre-populate `.openapi-generator-ignore` with a list of entries during the code generation process and the global/general option `openapiGeneratorIgnoreList` (e.g. --openapi-generator-ignore-list in CLI) can do exactly that. For example,
```
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g spring -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/spring --additional-properties useTags=true --openapi-generator-ignore-list "README.md,pom.xml,docs/*.md,src/main/java/org/openapitools/model/*"
```
Expand Down Expand Up @@ -434,9 +434,9 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
```
will rename SOLD to UNAVAILABLE instead.

Not all generators support thess features yet. Please give it a try to confirm the behaviour and open an issue (ticket) to let us know which generators you would like to have this feature enabled and we'll prioritize accordingly. We also welcome PRs to add these features to generators. Related PRs for reference: #16209, #16234 (modelNameMappings), #16194, #16206 (nameMappings, parameterNameMappings), #17108 (enumNameMappings).
Not all generators support these features yet. Please give it a try to confirm the behaviour and open an issue (ticket) to let us know which generators you would like to have this feature enabled and we'll prioritize accordingly. We also welcome PRs to add these features to generators. Related PRs for reference: #16209, #16234 (modelNameMappings), #16194, #16206 (nameMappings, parameterNameMappings), #17108 (enumNameMappings).

NOTE: some generators use `baseName` (original name obtained direclty from OpenAPI spec, e.g. `shipping-date`) mustache tag in the templates so the mapping feature won't work.
NOTE: some generators use `baseName` (original name obtained directly from OpenAPI spec, e.g. `shipping-date`) mustache tag in the templates so the mapping feature won't work.

To map `operationId` (used in method naming) to something else, use `operationIdNameMappings` option, e.g.

Expand Down Expand Up @@ -480,7 +480,7 @@ paths:

## Inline Schema Naming

Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option. For exmaple, run the following,
Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option. For example, run the following,

```
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings inline_object_2=SomethingMapped,inline_object_4=nothing_new
Expand All @@ -503,7 +503,7 @@ Another useful option is `inlineSchemaOptions`, which allows you to customize ho
- `ARRAY_ITEM_SUFFIX` sets the array item suffix
- `MAP_ITEM_SUFFIX` set the map item suffix
- `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas during refactoring
- `REFACTOR_ALLOF_INLINE_SCHEMAS=true` will restore the 6.x (or below) behaviour to refactor allOf inline schemas into $ref. (v7.0.0 will skip the refactoring of these allOf inline schmeas by default)
- `REFACTOR_ALLOF_INLINE_SCHEMAS=true` will restore the 6.x (or below) behaviour to refactor allOf inline schemas into $ref. (v7.0.0 will skip the refactoring of these allOf inline schemas by default)
- `RESOLVE_INLINE_ENUMS=true` will refactor inline enum definitions into $ref

## OpenAPI Normalizer
Expand All @@ -524,7 +524,7 @@ Example:
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/allOf_extension_parent.yaml -o /tmp/java-okhttp/ --openapi-normalizer REF_AS_PARENT_IN_ALLOF=true
```

- `REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY`: when set to `true`, oneOf/anyOf schema with only required properies only in a schema with properties will be removed. [(example)](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/removeAnyOfOneOfAndKeepPropertiesOnly_test.yaml)
- `REMOVE_ANYOF_ONEOF_AND_KEEP_PROPERTIES_ONLY`: when set to `true`, oneOf/anyOf schema with only required properties only in a schema with properties will be removed. [(example)](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/removeAnyOfOneOfAndKeepPropertiesOnly_test.yaml)

Example:
```
Expand Down
2 changes: 1 addition & 1 deletion docs/generators/swift5.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useCustomDateWithoutTime|Uses a custom type to decode and encode dates without time information to support OpenAPIs date format (default: false)| |false|
|useJsonEncodable|Make models conform to JSONEncodable protocol (default: true)| |true|
|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: false).| |null|
|validatable|Make validation rules and validator for model properies (default: true)| |true|
|validatable|Make validation rules and validator for model properties (default: true)| |true|

## IMPORT MAPPING

Expand Down
2 changes: 1 addition & 1 deletion docs/generators/swift6.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useCustomDateWithoutTime|Uses a custom type to decode and encode dates without time information to support OpenAPIs date format (default: false)| |false|
|useJsonEncodable|Make models conform to JSONEncodable protocol (default: true)| |true|
|useSPMFileStructure|Use SPM file structure and set the source path to Sources/{{projectName}} (default: true).| |null|
|validatable|Make validation rules and validator for model properies (default: true)| |true|
|validatable|Make validation rules and validator for model properties (default: true)| |true|

## IMPORT MAPPING

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ public void execute() throws MojoExecutionException {
}

// Apply Parameter Name Mappings
if (parameterNameMappings != null && (configOptions == null || !configOptions.containsKey("paramter-name-mappings"))) {
if (parameterNameMappings != null && (configOptions == null || !configOptions.containsKey("parameter-name-mappings"))) {
applyParameterNameMappingsKvpList(parameterNameMappings, configurator);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1928,9 +1928,9 @@ public String toInstantiationType(Schema schema) {
if (ModelUtils.isMapSchema(schema)) {
Schema additionalProperties = ModelUtils.getAdditionalProperties(schema);
String inner = getSchemaType(additionalProperties);
String mapInstantion = instantiationTypes.get("map");
if (mapInstantion != null) {
return mapInstantion + "<String, " + inner + ">";
String mapInstantiation = instantiationTypes.get("map");
if (mapInstantiation != null) {
return mapInstantiation + "<String, " + inner + ">";
}
return inner;
} else if (ModelUtils.isArraySchema(schema)) {
Expand Down Expand Up @@ -2203,7 +2203,7 @@ public String toDefaultValueWithParam(String name, Schema schema) {
* @return string presentation of the default value of the property
*/
public String toDefaultValue(CodegenProperty codegenProperty, Schema schema) {
// use toDefaultValue(schema) if generator has not overriden this method
// use toDefaultValue(schema) if generator has not overridden this method
return toDefaultValue(schema);
}

Expand Down Expand Up @@ -3135,7 +3135,7 @@ protected void setAddProps(Schema schema, IJsonSchemaValidationProperties proper
// if we are trying to set additionalProperties on an empty schema stop recursing
return;
}
// Note: This flag is set to true if additioanl properties
// Note: This flag is set to true if additional properties
// is set (any type, free form object, boolean true, string, etc).
// The variable name may be renamed later to avoid confusion.
boolean additionalPropertiesIsAnyType = false;
Expand Down Expand Up @@ -3954,7 +3954,7 @@ public CodegenProperty fromProperty(String name, Schema p, boolean required, boo
property._enum = new ArrayList<>();
for (Object i : _enum) {
// raw null values in enums are unions for nullable
// atttributes, not actual enum values, so we remove them here
// attributes, not actual enum values, so we remove them here
if (i == null) {
property.isNullable = true;
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ private void flattenResponses(String modelName, Operation operation) {
* breed:
* type: string
*
* @param key a unique name ofr the composed schema.
* @param key a unique name for the composed schema.
* @param children the list of nested schemas within a composed schema (allOf, anyOf, oneOf).
* @param skipAllOfInlineSchemas true if allOf inline schemas need to be skipped.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ private Schema normalizeComplexComposedSchema(Schema schema, Set<Schema> visited
}

// ===================== a list of rules =====================
// all rules (fuctions) start with the word "process"
// all rules (functions) start with the word "process"

/**
* Child schemas in `allOf` is considered a parent if it's a `$ref` (instead of inline schema).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ private boolean startsWithTwoUppercaseLetters(String name) {

@Override
public String toParamName(String name) {
// obtain the name from paramterNameMapping directly if provided
// obtain the name from parameterNameMapping directly if provided
if (parameterNameMapping.containsKey(name)) {
return parameterNameMapping.get(name);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected static String dropDots(String str) {

/**
* Escapes a reserved word as defined in the `reservedWords` array. Handle escaping
* those terms here. This logic is only called if a variable matches the reseved words
* those terms here. This logic is only called if a variable matches the reserved words
*
* @return the escaped term
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ private String getModelNameFromDataType(CodegenProperty cp) {
}

/**
* Update set of imports from codegen model recursivly
* Update set of imports from codegen model recursively
*
* @param modelName model name
* @param cm codegen model
Expand Down Expand Up @@ -1362,7 +1362,7 @@ public void postProcessPattern(String pattern, Map<String, Object> vendorExtensi
if (pattern != null) {
int i = pattern.lastIndexOf('/');

// TOOD update the check below follow python convention
// TODO update the check below follow python convention
//Must follow Perl /pattern/modifiers convention
if (pattern.charAt(0) != '/' || i < 2) {
throw new IllegalArgumentException("Pattern must follow the Perl "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ private String getModelNameFromDataType(CodegenProperty cp) {
}

/**
* Update set of imports from codegen model recursivly
* Update set of imports from codegen model recursively
*
* @param modelName model name
* @param cm codegen model
Expand Down Expand Up @@ -1896,7 +1896,7 @@ public void postProcessPattern(String pattern, Map<String, Object> vendorExtensi
if (pattern != null) {
int i = pattern.lastIndexOf('/');

// TOOD update the check below follow python convention
// TODO update the check below follow python convention
//Must follow Perl /pattern/modifiers convention
if (pattern.charAt(0) != '/' || i < 2) {
throw new IllegalArgumentException("Pattern must follow the Perl "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public String apiFileFolder() {
}

/**
* Location of created model files (it can be overriden using --additional-properties in openapi-generator-cli
* Location of created model files (it can be overridden using --additional-properties in openapi-generator-cli
*/
@Override
public String modelFileFolder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void processOpts() {
dateLibrary = "legacy";
}
super.processOpts();
// default jackson unless overriden by setSerializationLibrary
// default jackson unless overridden by setSerializationLibrary
this.jackson = !additionalProperties.containsKey(CodegenConstants.SERIALIZATION_LIBRARY) || SERIALIZATION_LIBRARY_JACKSON.equals(additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY));

convertPropertyToBooleanAndWriteBack(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, this::setUseOneOfDiscriminatorLookup);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ private void processJVMOkHttpLibrary(final String infrastructureFolder) {
supportingFiles.add(new SupportingFile("infrastructure/ApiResponse.kt.mustache", infrastructureFolder, "ApiResponse.kt"));
}

private void proccessJvmSpring(final String infrastructureFolder) {
private void processJvmSpring(final String infrastructureFolder) {
if (getSerializationLibrary() != SERIALIZATION_LIBRARY_TYPE.jackson) {
throw new RuntimeException("This library currently only supports jackson serialization. Try adding '--additional-properties serializationLibrary=jackson' to your command.");
}
Expand All @@ -800,7 +800,7 @@ private void proccessJvmSpring(final String infrastructureFolder) {
}

private void processJvmSpringWebClientLibrary(final String infrastructureFolder) {
proccessJvmSpring(infrastructureFolder);
processJvmSpring(infrastructureFolder);
additionalProperties.put(JVM_SPRING_WEBCLIENT, true);
}

Expand All @@ -809,7 +809,7 @@ private void processJvmSpringRestClientLibrary(final String infrastructureFolder
throw new RuntimeException("This library must use Spring Boot 3. Try adding '--additional-properties useSpringBoot3=true' to your command.");
}

proccessJvmSpring(infrastructureFolder);
processJvmSpring(infrastructureFolder);
additionalProperties.put(JVM_SPRING_RESTCLIENT, true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ public CodegenModel fromModel(String name, Schema model) {
}
}

// Do we suppport doing ToString/FromStr conversions for query parameters?
// Do we support doing ToString/FromStr conversions for query parameters?
boolean toStringSupport = true;
boolean isString = "String".equals(mdl.dataType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ private static String queryArgs(final CodegenOperation op) {
* <p>
* The data variant can have nulls and other non-scala things, but they know how to create validated model objects.
* <p>
* This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data varients.
* This 'asScalaDataType' is used to ensure the type hierarchy is correct for both the model and data variants.
* <p>
* e.g. consider this example:
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ private Set<String> reformatProvideArgsParams(Operation operation) {
if (argObj instanceof List) {
List<String> provideArgs = (List<String>) argObj;
if (!provideArgs.isEmpty()) {
List<String> formatedArgs = new ArrayList<>();
List<String> formattedArgs = new ArrayList<>();
for (String oneArg : provideArgs) {
if (StringUtils.isNotEmpty(oneArg)) {
String regexp = "(?<AnnotationTag>@)?(?<ClassPath>(?<PackageName>(\\w+\\.)*)(?<ClassName>\\w+))(?<Params>\\(.*?\\))?\\s?";
Expand All @@ -1095,10 +1095,10 @@ private Set<String> reformatProvideArgsParams(Operation operation) {
}
String newArg = String.join(" ", newArgs);
LOGGER.trace("new arg {} {}", newArg);
formatedArgs.add(newArg);
formattedArgs.add(newArg);
}
}
operation.getExtensions().put("x-spring-provide-args", formatedArgs);
operation.getExtensions().put("x-spring-provide-args", formattedArgs);
}
}
return provideArgsClassSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public Swift5ClientCodegen() {
.defaultValue(Boolean.FALSE.toString()));

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

supportedLibraries.put(LIBRARY_URLSESSION, "[DEFAULT] HTTP client: URLSession");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public Swift6ClientCodegen() {
.defaultValue(Boolean.FALSE.toString()));

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

cliOptions.add(new CliOption(API_STATIC_METHOD,
Expand Down
Loading
Loading