fix typos

This commit is contained in:
William Cheng 2022-02-26 14:01:17 +08:00
parent f774115af5
commit 9a33f99937
6 changed files with 17 additions and 17 deletions

View File

@ -3,7 +3,7 @@
<div align="center"> <div align="center">
[![Stable releaases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) [![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator) [![Stable releases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) [![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
</div> </div>
@ -699,8 +699,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2019/01/30 - [Rapid Application Development With API First Approach Using Open-API Generator](https://dzone.com/articles/rapid-api-development-using-open-api-generator) by [Milan Sonkar](https://dzone.com/users/828329/milan_sonkar.html) - 2019/01/30 - [Rapid Application Development With API First Approach Using Open-API Generator](https://dzone.com/articles/rapid-api-development-using-open-api-generator) by [Milan Sonkar](https://dzone.com/users/828329/milan_sonkar.html)
- 2019/02/02 - [平静を保ち、コードを生成せよ 〜 OpenAPI Generator誕生の背景と軌跡 〜](https://speakerdeck.com/akihito_nakano/gunmaweb34) by [中野暁人](https://github.com/ackintosh) at [Gunma.web #34 スキーマ駆動開発](https://gunmaweb.connpass.com/event/113974/) - 2019/02/02 - [平静を保ち、コードを生成せよ 〜 OpenAPI Generator誕生の背景と軌跡 〜](https://speakerdeck.com/akihito_nakano/gunmaweb34) by [中野暁人](https://github.com/ackintosh) at [Gunma.web #34 スキーマ駆動開発](https://gunmaweb.connpass.com/event/113974/)
- 2019/02/20 - [An adventure in OpenAPI V3 code generation](https://mux.com/blog/an-adventure-in-openapi-v3-api-code-generation/) by [Phil Cluff](https://mux.com/blog/author/philc/) - 2019/02/20 - [An adventure in OpenAPI V3 code generation](https://mux.com/blog/an-adventure-in-openapi-v3-api-code-generation/) by [Phil Cluff](https://mux.com/blog/author/philc/)
- 2019/02/26 - [Building API Services: A Beginners Guide](https://medium.com/google-cloud/building-api-services-a-beginners-guide-7274ae4c547f) by [Ratros Y.](https://medium.com/@ratrosy) in [Google Cloud Platofrm Blog](https://medium.com/google-cloud) - 2019/02/26 - [Building API Services: A Beginners Guide](https://medium.com/google-cloud/building-api-services-a-beginners-guide-7274ae4c547f) by [Ratros Y.](https://medium.com/@ratrosy) in [Google Cloud Platform Blog](https://medium.com/google-cloud)
- 2019/02/26 - [Building APIs with OpenAPI: Continued](https://medium.com/@ratrosy/building-apis-with-openapi-continued-5d0faaed32eb) by [Ratros Y.](https://medium.com/@ratrosy) in [Google Cloud Platofrm Blog](https://medium.com/google-cloud) - 2019/02/26 - [Building APIs with OpenAPI: Continued](https://medium.com/@ratrosy/building-apis-with-openapi-continued-5d0faaed32eb) by [Ratros Y.](https://medium.com/@ratrosy) in [Google Cloud Platform Blog](https://medium.com/google-cloud)
- 2019-03-07 - [OpenAPI Generator で Spring Boot と Angular をタイプセーフに繋ぐ](https://qiita.com/chibato/items/e4a748db12409b40c02f) by [Tomofumi Chiba](https://github.com/chibat) - 2019-03-07 - [OpenAPI Generator で Spring Boot と Angular をタイプセーフに繋ぐ](https://qiita.com/chibato/items/e4a748db12409b40c02f) by [Tomofumi Chiba](https://github.com/chibat)
- 2019-03-16 - [A Quick introduction to manual OpenAPI V3](https://vadosware.io/post/quick-intro-to-manual-openapi-v3/) by [vados](https://github.com/t3hmrman) at [VADOSWARE](https://vadosware.io) - 2019-03-16 - [A Quick introduction to manual OpenAPI V3](https://vadosware.io/post/quick-intro-to-manual-openapi-v3/) by [vados](https://github.com/t3hmrman) at [VADOSWARE](https://vadosware.io)
- 2019-03-25 - [Access any REST service with the SAP S/4HANA Cloud SDK](https://blogs.sap.com/2019/03/25/integrate-sap-s4hana-cloud-sdk-with-open-api/) by [Alexander Duemont](https://people.sap.com/alexander.duemont) - 2019-03-25 - [Access any REST service with the SAP S/4HANA Cloud SDK](https://blogs.sap.com/2019/03/25/integrate-sap-s4hana-cloud-sdk-with-open-api/) by [Alexander Duemont](https://people.sap.com/alexander.duemont)
@ -906,9 +906,9 @@ Here is a list of template creators:
* Java (Java 11 Native HTTP client): @bbdouglas * Java (Java 11 Native HTTP client): @bbdouglas
* Java (Apache HttpClient): @harrywhite4 * Java (Apache HttpClient): @harrywhite4
* Javascript/NodeJS: @jfiala * Javascript/NodeJS: @jfiala
* Javascript (Apollo DataSource): @erithmetic * JavaScript (Apollo DataSource): @erithmetic
* Javascript (Closure-annotated Angular) @achew22 * JavaScript (Closure-annotated Angular) @achew22
* Javascript (Flow types) @jaypea * JavaScript (Flow types) @jaypea
* JMeter: @davidkiss * JMeter: @davidkiss
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert) * Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Kotlin (MultiPlatform): @andrewemery * Kotlin (MultiPlatform): @andrewemery

View File

@ -13,7 +13,7 @@
# or # or
# OPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli.sh # OPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli.sh
# #
# This is also helpful, for example, if you want want to evaluate a SNAPSHOT version. # This is also helpful, for example, if you want to evaluate a SNAPSHOT version.
# #
# NOTE: Jars are downloaded on demand from maven into the same directory as this script # NOTE: Jars are downloaded on demand from maven into the same directory as this script
# for every 'latest' version pulled from github. Consider putting this under its own directory. # for every 'latest' version pulled from github. Consider putting this under its own directory.

View File

@ -5,7 +5,7 @@ WORKDIR /generator
COPY target/openapi-generator-online.jar /generator/openapi-generator-online.jar COPY target/openapi-generator-online.jar /generator/openapi-generator-online.jar
# GENERATOR_HOST can be used to determine the target location of a download link. # GENERATOR_HOST can be used to determine the target location of a download link.
# The default value asumes binding to host via: docker -p 8080:8080 image_name # The default value assumes binding to host via: docker -p 8080:8080 image_name
# Generally, this "just works" without GENERATOR_HOST, and this is provided only as # Generally, this "just works" without GENERATOR_HOST, and this is provided only as
# a workaround if all else fails. # a workaround if all else fails.
ENV GENERATOR_HOST="" ENV GENERATOR_HOST=""

View File

@ -30,7 +30,7 @@ public class CodegenOperation {
isResponseBinary = false, isResponseFile = false, hasReference = false, isResponseBinary = false, isResponseFile = false, hasReference = false,
isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy, isRestfulIndex, isRestfulShow, isRestfulCreate, isRestfulUpdate, isRestfulDestroy,
isRestful, isDeprecated, isCallbackRequest, uniqueItems, hasDefaultResponse = false, isRestful, isDeprecated, isCallbackRequest, uniqueItems, hasDefaultResponse = false,
hasErrorResponseObject; // if 4xx, 5xx repsonses have at least one error object defined hasErrorResponseObject; // if 4xx, 5xx responses have at least one error object defined
public String path, operationId, returnType, returnFormat, httpMethod, returnBaseType, public String path, operationId, returnType, returnFormat, httpMethod, returnBaseType,
returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse; returnContainer, summary, unescapedNotes, notes, baseName, defaultResponse;
public CodegenDiscriminator discriminator; public CodegenDiscriminator discriminator;

View File

@ -2768,7 +2768,7 @@ public class DefaultCodegen implements CodegenConfig {
updateModelForObject(m, schema); updateModelForObject(m, schema);
} else if (!ModelUtils.isNullType(schema)) { } else if (!ModelUtils.isNullType(schema)) {
// referenced models here, component that refs another component which is a model // referenced models here, component that refs another component which is a model
// if a component references a schema which is not a generated model, the the refed schema will be loaded into // if a component references a schema which is not a generated model, the refed schema will be loaded into
// schema by unaliasSchema and one of the above code paths will be taken // schema by unaliasSchema and one of the above code paths will be taken
; ;
} }
@ -3620,7 +3620,7 @@ public class DefaultCodegen implements CodegenConfig {
if (!ModelUtils.isArraySchema(p) && !ModelUtils.isMapSchema(p) && !isFreeFormObject(p) && !isAnyTypeWithNothingElseSet) { if (!ModelUtils.isArraySchema(p) && !ModelUtils.isMapSchema(p) && !isFreeFormObject(p) && !isAnyTypeWithNothingElseSet) {
/* schemas that are not Array, not ModelUtils.isMapSchema, not isFreeFormObject, not AnyType with nothing else set /* schemas that are not Array, not ModelUtils.isMapSchema, not isFreeFormObject, not AnyType with nothing else set
* so primitve schemas int, str, number, referenced schemas, AnyType schemas with properties, enums, or composition * so primitive schemas int, str, number, referenced schemas, AnyType schemas with properties, enums, or composition
*/ */
String type = getSchemaType(p); String type = getSchemaType(p);
setNonArrayMapProperty(property, type); setNonArrayMapProperty(property, type);
@ -4002,7 +4002,7 @@ public class DefaultCodegen implements CodegenConfig {
for (Entry<String, Header> entry : headers.entrySet()) { for (Entry<String, Header> entry : headers.entrySet()) {
String headerName = entry.getKey(); String headerName = entry.getKey();
Header header = entry.getValue(); Header header = entry.getValue();
CodegenParameter responseHeader = heeaderToCodegenParameter(header, headerName, imports, String.format(Locale.ROOT, "%sResponseParameter", r.code)); CodegenParameter responseHeader = headerToCodegenParameter(header, headerName, imports, String.format(Locale.ROOT, "%sResponseParameter", r.code));
responseHeaders.add(responseHeader); responseHeaders.add(responseHeader);
} }
r.setResponseHeaders(responseHeaders); r.setResponseHeaders(responseHeaders);
@ -4028,7 +4028,7 @@ public class DefaultCodegen implements CodegenConfig {
op.isResponseFile = Boolean.TRUE; op.isResponseFile = Boolean.TRUE;
} }
// check if any 4xx or 5xx reponse has an error response object defined // check if any 4xx or 5xx response has an error response object defined
if ((Boolean.TRUE.equals(r.is4xx) || Boolean.TRUE.equals(r.is5xx)) && if ((Boolean.TRUE.equals(r.is4xx) || Boolean.TRUE.equals(r.is5xx)) &&
Boolean.FALSE.equals(r.primitiveType) && Boolean.FALSE.equals(r.simpleType)) { Boolean.FALSE.equals(r.primitiveType) && Boolean.FALSE.equals(r.simpleType)) {
op.hasErrorResponseObject = Boolean.TRUE; op.hasErrorResponseObject = Boolean.TRUE;
@ -5959,7 +5959,7 @@ public class DefaultCodegen implements CodegenConfig {
// Int.max / 192 // Int.max / 192
// The number 192 that is used to calculate this random value, is the Swift Evolution proposal for frozen/non-frozen enums. // The number 192 that is used to calculate this random value, is the Swift Evolution proposal for frozen/non-frozen enums.
// [SE-0192](https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md) // [SE-0192](https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md)
// Since this functionality was born in the Swift 5 generator and latter on broth to all generatorss // Since this functionality was born in the Swift 5 generator and latter on broth to all generators
// https://github.com/OpenAPITools/openapi-generator/pull/11013 // https://github.com/OpenAPITools/openapi-generator/pull/11013
enumValue = String.valueOf(11184809); enumValue = String.valueOf(11184809);
} }
@ -6692,7 +6692,7 @@ public class DefaultCodegen implements CodegenConfig {
return "SchemaFor" + mediaTypeSchemaSuffix + toModelName(contentType); return "SchemaFor" + mediaTypeSchemaSuffix + toModelName(contentType);
} }
private CodegenParameter heeaderToCodegenParameter(Header header, String headerName, Set<String> imports, String mediaTypeSchemaSuffix) { private CodegenParameter headerToCodegenParameter(Header header, String headerName, Set<String> imports, String mediaTypeSchemaSuffix) {
if (header == null) { if (header == null) {
return null; return null;
} }
@ -6736,7 +6736,7 @@ public class DefaultCodegen implements CodegenConfig {
for (Entry<String, Header> headerEntry : encHeaders.entrySet()) { for (Entry<String, Header> headerEntry : encHeaders.entrySet()) {
String headerName = headerEntry.getKey(); String headerName = headerEntry.getKey();
Header header = ModelUtils.getReferencedHeader(this.openAPI, headerEntry.getValue()); Header header = ModelUtils.getReferencedHeader(this.openAPI, headerEntry.getValue());
CodegenParameter param = heeaderToCodegenParameter(header, headerName, imports, mediaTypeSchemaSuffix); CodegenParameter param = headerToCodegenParameter(header, headerName, imports, mediaTypeSchemaSuffix);
headers.add(param); headers.add(param);
} }
} }

View File

@ -975,7 +975,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
*/ */
public void setApiName(String apiName) { public void setApiName(String apiName) {
if (!"".equals(apiName) && (Boolean.FALSE.equals(apiName.matches("^[a-zA-Z0-9_]*$")) || Boolean.FALSE.equals(apiName.matches("^[a-zA-Z].*")))) { if (!"".equals(apiName) && (Boolean.FALSE.equals(apiName.matches("^[a-zA-Z0-9_]*$")) || Boolean.FALSE.equals(apiName.matches("^[a-zA-Z].*")))) {
throw new RuntimeException("Invalid project name " + apiName + ". May only contain alphanumeric characaters or underscore and start with a letter."); throw new RuntimeException("Invalid project name " + apiName + ". May only contain alphanumeric characters or underscore and start with a letter.");
} }
this.apiName = apiName; this.apiName = apiName;
} }