Skip to content

Commit

Permalink
Fix minor typos
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanBaulch committed Aug 28, 2024
1 parent 4330b2f commit b7f00a2
Show file tree
Hide file tree
Showing 275 changed files with 853 additions and 853 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,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 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
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 @@ -1922,9 +1922,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 @@ -2197,7 +2197,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 @@ -3129,7 +3129,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 All @@ -3152,7 +3152,7 @@ protected void setAddProps(Schema schema, IJsonSchemaValidationProperties proper
additionalPropertiesIsAnyType = true;
}
} else {
// if additioanl properties is set (e.g. free form object, any type, string, etc)
// if additional properties is set (e.g. free form object, any type, string, etc)
addPropProp = fromProperty(getAdditionalPropertiesName(), (Schema) schema.getAdditionalProperties(), false);
additionalPropertiesIsAnyType = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,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 @@ -637,7 +637,7 @@ private Schema normalizeOneOf(Schema schema, Set<Schema> visitedSchemas) {
if (!(item instanceof Schema)) {
throw new RuntimeException("Error! oneOf schema is not of the type Schema: " + item);
}
// normalize oenOf sub schemas one by one
// normalize oneOf sub schemas one by one
normalizeSchema((Schema) item, visitedSchemas);
}
// process rules here
Expand Down Expand Up @@ -678,7 +678,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 @@ -924,7 +924,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 @@ -1195,7 +1195,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 @@ -1355,7 +1355,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 @@ -1698,7 +1698,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 @@ -1907,7 +1907,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 @@ -317,7 +317,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 @@ -757,7 +757,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 @@ -770,7 +770,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 @@ -779,7 +779,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 @@ -1216,7 +1216,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 @@ -868,7 +868,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 @@ -318,7 +318,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 @@ -757,8 +757,8 @@ protected void addVendorExtensions(CodegenParameter cp, CodegenOperation operati
CodegenModel baseModel = modelMaps.get(cp.items.dataType);
boolean isBaseTypeEnum = cp.items.isEnum || cp.isEnum || (baseModel != null && baseModel.isEnum);
cp.vendorExtensions.put("x-swift-is-base-type-enum", isBaseTypeEnum);
boolean isBaseTypeUdid = cp.items.isUuid || cp.isUuid;
cp.vendorExtensions.put("x-swift-is-base-type-udid", isBaseTypeUdid);
boolean isBaseTypeUuid = cp.items.isUuid || cp.isUuid;
cp.vendorExtensions.put("x-swift-is-base-type-uuid", isBaseTypeUuid);

boolean useEncoder = !isBaseTypeEnum && !cp.items.isString || (baseModel != null && !baseModel.isString);
cp.vendorExtensions.put("x-swift-use-encoder", useEncoder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ web::json::value ModelBase::toJson( const std::vector<T>& value )
template<typename T>
web::json::value ModelBase::toJson( const std::set<T>& value )
{
// There's no protoype web::json::value::array(...) taking a std::set parameter. Converting to std::vector to get an array.
// There's no prototype web::json::value::array(...) taking a std::set parameter. Converting to std::vector to get an array.
std::vector<web::json::value> ret;
for ( const auto& x : value )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace {{packageName}}.Client
public string SigningAlgorithm { get; set; }

/// <summary>
/// Gets the Signature validaty period in seconds
/// Gets the Signature validity period in seconds
/// </summary>
public int SignatureValidityPeriod { get; set; }

Expand Down
Loading

0 comments on commit b7f00a2

Please sign in to comment.