Grammar and spelling fixes (#329)

This commit is contained in:
Ville Skyttä
2018-06-16 19:49:01 +03:00
committed by William Cheng
parent e5635d236d
commit 798bf61fde
42 changed files with 70 additions and 70 deletions

View File

@@ -210,7 +210,7 @@ public class DefaultCodegen implements CodegenConfig {
for (String name : allModels.keySet()) {
CodegenModel cm = allModels.get(name);
CodegenModel parent = allModels.get(cm.getParent());
// if a discriminator exists on the parent, don't add this child to the inheritance heirarchy
// if a discriminator exists on the parent, don't add this child to the inheritance hierarchy
// TODO Determine what to do if the parent discriminator name == the grandparent discriminator name
while (parent != null) {
if (parent.getChildren() == null) {
@@ -1201,7 +1201,7 @@ public class DefaultCodegen implements CodegenConfig {
*/
private static String getPrimitiveType(Schema schema) {
if (schema == null) {
throw new RuntimeException("schema cannnot be null in getPrimitiveType");
throw new RuntimeException("schema cannot be null in getPrimitiveType");
} else if (ModelUtils.isStringSchema(schema) && "number".equals(schema.getFormat())) {
// special handle of type: string, format: number
return "BigDecimal";
@@ -1300,7 +1300,7 @@ public class DefaultCodegen implements CodegenConfig {
/**
* Determine the type alias for the given type if it exists. This feature
* was original developed for Java because the language does not have a aliasing
* was originally developed for Java because the language does not have an aliasing
* mechanism of its own but later extends to handle other languages
*
* @param name The type name.
@@ -2055,7 +2055,7 @@ public class DefaultCodegen implements CodegenConfig {
}
if (operation == null)
throw new RuntimeException("operation cannnot be null in fromOperation");
throw new RuntimeException("operation cannot be null in fromOperation");
// store the original operationId for plug-in
op.operationIdOriginal = operation.getOperationId();
@@ -3853,7 +3853,7 @@ public class DefaultCodegen implements CodegenConfig {
RequestBody requestBody = ModelUtils.getReferencedRequestBody(openAPI, operation.getRequestBody());
if (requestBody == null || requestBody.getContent() == null || requestBody.getContent().isEmpty()) {
return Collections.emptySet(); // return emtpy set
return Collections.emptySet(); // return empty set
}
return requestBody.getContent().keySet();
}
@@ -4249,7 +4249,7 @@ public class DefaultCodegen implements CodegenConfig {
if (schema.getAdditionalProperties() != null) {// http body is map
LOGGER.error("Map should be supported. Please report to openapi-generator github repo about the issue.");
} else if (codegenProperty != null) {
LOGGER.warn("The folowing schema has undefined (null) baseType. " +
LOGGER.warn("The following schema has undefined (null) baseType. " +
"It could be due to form parameter defined in OpenAPI v2 spec with incorrect consumes. " +
"A correct 'consumes' for form parameters should be " +
"'application/x-www-form-urlencoded' or 'multipart/form-data'");

View File

@@ -1012,7 +1012,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
for (String key : definitions.keySet()) {
Schema schema = definitions.get(key);
if (schema == null)
throw new RuntimeException("schema cannnot be null in processMoels");
throw new RuntimeException("schema cannot be null in processMoels");
CodegenModel cm = config.fromModel(key, schema, allDefinitions);
Map<String, Object> mo = new HashMap<String, Object>();
mo.put("model", cm);

View File

@@ -378,7 +378,7 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg
/**
* Post process the media types (produces and consumes) for Ada code generator.
* <p>
* For each media type, add a adaMediaType member that gives the Ada enum constant
* For each media type, add an adaMediaType member that gives the Ada enum constant
* for the corresponding type.
*
* @param types the list of media types.

View File

@@ -341,7 +341,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
.build();
if (objs.containsKey("lambda")) {
LOGGER.warn("An property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'. " +
LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'. " +
"You'll likely need to use a custom template, " +
"see https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format. ");
objs.put("_lambda", lambdas);

View File

@@ -229,7 +229,7 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
.build();
if (objs.containsKey("lambda")) {
LOGGER.warn("An property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'. " +
LOGGER.warn("A property named 'lambda' already exists. Mustache lambdas renamed from 'lambda' to '_lambda'. " +
"You'll likely need to use a custom template, " +
"see https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format. "); // TODO: update the URL
objs.put("_lambda", lambdas);

View File

@@ -39,7 +39,7 @@ public class URLPathUtils {
LOGGER.warn("Server information seems not defined in the spec. Default to {}.", LOCAL_HOST);
return getDefaultUrl();
}
// TOOD need a way to obtain all server URLs
// TODO need a way to obtain all server URLs
final Server server = servers.get(0);
String url = sanitizeUrl(server.getUrl());
@@ -150,4 +150,4 @@ public class URLPathUtils {
return null;
}
}
}
}