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

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# this bash script run the scripts for the 'mature' generators # this bash script run the scripts for the 'mature' generators
# it ensures that all changes are commited into the 'samples/' folder # it ensures that all changes are committed into the 'samples/' folder
echo "# START SCRIPT: $0" echo "# START SCRIPT: $0"

View File

@ -166,7 +166,7 @@ cf8d8d56f [PHP] Fix code example from README. Variable name was missing when usi
76907cacd [PHP] declare property headerSelector 76907cacd [PHP] declare property headerSelector
### Python ### Python
7184f1ec6 [python] asyncio supports _preload_content; remove unsed imports (#107) 7184f1ec6 [python] asyncio supports _preload_content; remove unused imports (#107)
d74d2ba03 fix: python clients d74d2ba03 fix: python clients
8e0a0ebd6 Fix python / tornado body handling 8e0a0ebd6 Fix python / tornado body handling
b39c35c76 Fix inconsistency between model name and file name in python client b39c35c76 Fix inconsistency between model name and file name in python client
@ -250,7 +250,7 @@ ce930e7a6 [Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid)
ff1178ad7 [Java][Spring] fix missing optional query params ff1178ad7 [Java][Spring] fix missing optional query params
2103fadab Fix package declaration for play-framework 2103fadab Fix package declaration for play-framework
2c6380c84 fix inner item (list, map) for play framework 2c6380c84 fix inner item (list, map) for play framework
e33b350c8 Fix an issue in Play Framework generator where a CSV is empty and transfered to the controllerImp with an empty item. e33b350c8 Fix an issue in Play Framework generator where a CSV is empty and transferred to the controllerImp with an empty item.
99fc27246 [JAX-RS][Spec] Removes throws Exception. 99fc27246 [JAX-RS][Spec] Removes throws Exception.
fe2a44339 Fixes issue (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored). fe2a44339 Fixes issue (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored).
d890d733f [JaxRS][Java] issue with implFolder on windows, and required fields generation for containers (#88) d890d733f [JaxRS][Java] issue with implFolder on windows, and required fields generation for containers (#88)

View File

@ -10,6 +10,6 @@ This is an example of building a OpenAPI-enabled server in Java using the Spring
The underlying library integrating OpenAPI to SpringBoot is [springfox](https://github.com/springfox/springfox) The underlying library integrating OpenAPI to SpringBoot is [springfox](https://github.com/springfox/springfox)
Start your server as an simple java application Start your server as a simple java application
Change default port value in application.properties Change default port value in application.properties

View File

@ -210,7 +210,7 @@ public class DefaultCodegen implements CodegenConfig {
for (String name : allModels.keySet()) { for (String name : allModels.keySet()) {
CodegenModel cm = allModels.get(name); CodegenModel cm = allModels.get(name);
CodegenModel parent = allModels.get(cm.getParent()); 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 // TODO Determine what to do if the parent discriminator name == the grandparent discriminator name
while (parent != null) { while (parent != null) {
if (parent.getChildren() == null) { if (parent.getChildren() == null) {
@ -1201,7 +1201,7 @@ public class DefaultCodegen implements CodegenConfig {
*/ */
private static String getPrimitiveType(Schema schema) { private static String getPrimitiveType(Schema schema) {
if (schema == null) { 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())) { } else if (ModelUtils.isStringSchema(schema) && "number".equals(schema.getFormat())) {
// special handle of type: string, format: number // special handle of type: string, format: number
return "BigDecimal"; return "BigDecimal";
@ -1300,7 +1300,7 @@ public class DefaultCodegen implements CodegenConfig {
/** /**
* Determine the type alias for the given type if it exists. This feature * 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 * mechanism of its own but later extends to handle other languages
* *
* @param name The type name. * @param name The type name.
@ -2055,7 +2055,7 @@ public class DefaultCodegen implements CodegenConfig {
} }
if (operation == null) 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 // store the original operationId for plug-in
op.operationIdOriginal = operation.getOperationId(); op.operationIdOriginal = operation.getOperationId();
@ -3853,7 +3853,7 @@ public class DefaultCodegen implements CodegenConfig {
RequestBody requestBody = ModelUtils.getReferencedRequestBody(openAPI, operation.getRequestBody()); RequestBody requestBody = ModelUtils.getReferencedRequestBody(openAPI, operation.getRequestBody());
if (requestBody == null || requestBody.getContent() == null || requestBody.getContent().isEmpty()) { 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(); return requestBody.getContent().keySet();
} }
@ -4249,7 +4249,7 @@ public class DefaultCodegen implements CodegenConfig {
if (schema.getAdditionalProperties() != null) {// http body is map if (schema.getAdditionalProperties() != null) {// http body is map
LOGGER.error("Map should be supported. Please report to openapi-generator github repo about the issue."); LOGGER.error("Map should be supported. Please report to openapi-generator github repo about the issue.");
} else if (codegenProperty != null) { } 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. " + "It could be due to form parameter defined in OpenAPI v2 spec with incorrect consumes. " +
"A correct 'consumes' for form parameters should be " + "A correct 'consumes' for form parameters should be " +
"'application/x-www-form-urlencoded' or 'multipart/form-data'"); "'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()) { for (String key : definitions.keySet()) {
Schema schema = definitions.get(key); Schema schema = definitions.get(key);
if (schema == null) 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); CodegenModel cm = config.fromModel(key, schema, allDefinitions);
Map<String, Object> mo = new HashMap<String, Object>(); Map<String, Object> mo = new HashMap<String, Object>();
mo.put("model", cm); 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. * Post process the media types (produces and consumes) for Ada code generator.
* <p> * <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. * for the corresponding type.
* *
* @param types the list of media types. * @param types the list of media types.

View File

@ -341,7 +341,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
.build(); .build();
if (objs.containsKey("lambda")) { 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, " + "You'll likely need to use a custom template, " +
"see https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format. "); "see https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format. ");
objs.put("_lambda", lambdas); objs.put("_lambda", lambdas);

View File

@ -229,7 +229,7 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
.build(); .build();
if (objs.containsKey("lambda")) { 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, " + "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 "see https://github.com/swagger-api/swagger-codegen#modifying-the-client-library-format. "); // TODO: update the URL
objs.put("_lambda", lambdas); 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); LOGGER.warn("Server information seems not defined in the spec. Default to {}.", LOCAL_HOST);
return getDefaultUrl(); 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); final Server server = servers.get(0);
String url = sanitizeUrl(server.getUrl()); String url = sanitizeUrl(server.getUrl());
@ -150,4 +150,4 @@ public class URLPathUtils {
return null; return null;
} }
} }
} }

View File

@ -18,7 +18,7 @@ run the following command:
gprbuild -p -P{{projectName}} gprbuild -p -P{{projectName}}
``` ```
After the build is successfull, you will get the server binary After the build is successful, you will get the server binary
in bin/{{packageName}}-server and you can start it as follows: in bin/{{packageName}}-server and you can start it as follows:
``` ```
./bin/{{packageName}}-server ./bin/{{packageName}}-server

View File

@ -7,7 +7,7 @@ expanded class
feature -- Access feature -- Access
from_json (a_val:STRING; a_type: TYPE [detachable ANY] ): detachable ANY from_json (a_val:STRING; a_type: TYPE [detachable ANY] ): detachable ANY
-- Deserialize a a json representation `a_val' to an object -- Deserialize a json representation `a_val' to an object
-- of type `a_type' -- of type `a_type'
local local
conv_from: JSON_BASIC_REFLECTOR_DESERIALIZER conv_from: JSON_BASIC_REFLECTOR_DESERIALIZER

View File

@ -915,7 +915,7 @@ public class ApiClient {
* @param <T> Type * @param <T> Type
* @param response Response * @param response Response
* @param returnType Return type * @param returnType Return type
* @throws ApiException If the response has a unsuccessful status code or * @throws ApiException If the response has an unsuccessful status code or
* fail to deserialize the response body * fail to deserialize the response body
* @return Type * @return Type
*/ */

View File

@ -12,7 +12,7 @@ This is an example of building a OpenAPI-enabled server in Java using the Spring
The underlying library integrating OpenAPI to SpringBoot is [springfox](https://github.com/springfox/springfox) The underlying library integrating OpenAPI to SpringBoot is [springfox](https://github.com/springfox/springfox)
{{/useSpringfox}} {{/useSpringfox}}
Start your server as an simple java application Start your server as a simple java application
{{^reactive}} {{^reactive}}
You can view the api documentation in swagger-ui by pointing to You can view the api documentation in swagger-ui by pointing to
@ -46,4 +46,4 @@ public interface PetClient extends PetApi {
} }
``` ```
{{/interfaceOnly}} {{/interfaceOnly}}

View File

@ -2,7 +2,7 @@
/* /*
* MultipartFormData.h * MultipartFormData.h
* *
* This class represents a container for building a application/x-multipart-formdata requests. * This class represents a container for building application/x-multipart-formdata requests.
*/ */
#ifndef {{modelHeaderGuardPrefix}}_MultipartFormData_H_ #ifndef {{modelHeaderGuardPrefix}}_MultipartFormData_H_

View File

@ -58,7 +58,7 @@ defmodule {{moduleName}}.Connection do
{{/isOAuth}} {{/isOAuth}}
{{#isBasic}} {{#isBasic}}
@doc """ @doc """
Configure an client connection using Basic authentication. Configure a client connection using Basic authentication.
## Parameters ## Parameters

View File

@ -11,7 +11,7 @@ import flash.events.Event;
public class ApiClientEvent extends Event{ public class ApiClientEvent extends Event{
/** /**
* Event type to indicate a unsuccessful invocation * Event type to indicate an unsuccessful invocation
*/ */
public static const FAILURE_EVENT:String = "unsuccesfulInvocation"; public static const FAILURE_EVENT:String = "unsuccesfulInvocation";
@ -33,4 +33,4 @@ public class ApiClientEvent extends Event{
super(type, bubbles, cancelable); super(type, bubbles, cancelable);
} }
} }
} }

View File

@ -15,7 +15,7 @@
<!-- Flex Ant Tasks used to perform compc and mxml compiling more info at http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks --> <!-- Flex Ant Tasks used to perform compc and mxml compiling more info at http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks -->
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/> <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<target name="setup" description="perform an setup operations"/> <target name="setup" description="perform setup operations"/>
<!-- Execute the ASDoc Compile which runs 3 separate tasks in a series --> <!-- Execute the ASDoc Compile which runs 3 separate tasks in a series -->
<target name="compile" description="series of tasks to create docs and swc"> <target name="compile" description="series of tasks to create docs and swc">
@ -28,7 +28,7 @@
</target> </target>
<target name="deploy" description="perform an deployment operations"/> <target name="deploy" description="perform deployment operations"/>
<target name="install" description="perform an installation operations"/> <target name="install" description="perform an installation operations"/>
@ -189,4 +189,4 @@
<target name="test" depends="compile-test, do-test"> <target name="test" depends="compile-test, do-test">
</target> </target>
</project> </project>

View File

@ -51,7 +51,7 @@ def _deserialize_primitive(data, klass):
def _deserialize_object(value): def _deserialize_object(value):
"""Return a original value. """Return an original value.
:return: object. :return: object.
""" """

View File

@ -16,7 +16,7 @@ func (c contextKey) String() string {
} }
var ( var (
// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
ContextOAuth2 = contextKey("token") ContextOAuth2 = contextKey("token")
// ContextBasicAuth takes BasicAuth as authentication for the request. // ContextBasicAuth takes BasicAuth as authentication for the request.

View File

@ -17,9 +17,9 @@ g)Allow you to integrate with tracing server (Example Zipkin)
h)Allow you to capture log in your microservice and send to Log management server (Ex ELK or splunk) h)Allow you to capture log in your microservice and send to Log management server (Ex ELK or splunk)
i)Allow you to configure Oauth2 security based authorization for your microservice i)Allow you to configure Oauth2 security based authorization for your microservice
Additonal Features Additional Features
j)generate sample cucumber file and dependency to drive your Behaviour driven development. j)generate sample cucumber file and dependency to drive your Behaviour driven development.
k)generate gatling based perfromance test , which can be excuted via build pipeline like jenkins etc. k)generate gatling based performance test, which can be excuted via build pipeline like jenkins etc.
Working: Working:
@ -136,7 +136,7 @@ HttpLogging filter is provided for logging in the request and response. Can be f
Spring security is also provided to secure the resources. Please modify according to your needs. Spring security is also provided to secure the resources. Please modify according to your needs.
First run: First run:
Import the project in to the eclipse. Run the app as an spring boot application.The project will run on http://localhost:8008 Import the project in to the eclipse. Run the app as a spring boot application.The project will run on http://localhost:8008
Swagger ui available on: Swagger ui available on:
http://localhost:8008/swagger-ui.html http://localhost:8008/swagger-ui.html
If all the configurations have been enabled(depending on the port) below are some of the URls to access: If all the configurations have been enabled(depending on the port) below are some of the URls to access:
@ -152,4 +152,4 @@ Pkmst examples
https://github.com/ProKarma-Inc/pkmst-getting-started-examples https://github.com/ProKarma-Inc/pkmst-getting-started-examples
Pkmst Extensions Pkmst Extensions
https://github.com/ProKarma-Inc/pkmst-extention https://github.com/ProKarma-Inc/pkmst-extention

View File

@ -82,7 +82,7 @@
/** /**
* Sets API key * Sets API key
* *
* To remove a apiKey for an identifier, just set the apiKey to nil. * To remove an apiKey for an identifier, just set the apiKey to nil.
* *
* @param apiKey API key or token. * @param apiKey API key or token.
* @param identifier API key identifier (authentication schema). * @param identifier API key identifier (authentication schema).

View File

@ -38,7 +38,7 @@ extern NSInteger const {{classPrefix}}UnknownResponseObjectErrorCode;
@interface {{classPrefix}}ResponseDeserializer : NSObject <{{classPrefix}}ResponseDeserializer> @interface {{classPrefix}}ResponseDeserializer : NSObject <{{classPrefix}}ResponseDeserializer>
/** /**
* If an null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored * If a null value occurs in dictionary or array if set to YES whole response will be invalid else will be ignored
* @default NO * @default NO
*/ */
@property (nonatomic, assign) BOOL treatNullAsError; @property (nonatomic, assign) BOOL treatNullAsError;

View File

@ -213,7 +213,7 @@ class ObjectSerializer
* @param string[] $httpHeaders HTTP headers * @param string[] $httpHeaders HTTP headers
* @param string $discriminator discriminator if polymorphism is used * @param string $discriminator discriminator if polymorphism is used
* *
* @return object|array|null an single or an array of $class instances * @return object|array|null a single or an array of $class instances
*/ */
public static function deserialize($data, $class, $httpHeaders = null) public static function deserialize($data, $class, $httpHeaders = null)
{ {

View File

@ -552,7 +552,7 @@ class ApiClient(object):
return data return data
def __deserialize_object(self, value): def __deserialize_object(self, value):
"""Return a original value. """Return an original value.
:return: object. :return: object.
""" """

View File

@ -46,7 +46,7 @@ PROJECT_NUMBER = {{#openAPI}}{{#info}}{{version}}{{/info}}{{/openAPI}}
PROJECT_BRIEF = "An SDK for creating client applications for {{#openAPI}}{{#info}}{{title}}{{/info}}{{/openAPI}} on Tizen Platform (http://tizen.org/)" PROJECT_BRIEF = "An SDK for creating client applications for {{#openAPI}}{{#info}}{{title}}{{/info}}{{/openAPI}} on Tizen Platform (http://tizen.org/)"
# With the PROJECT_LOGO tag one can specify an logo or icon that is included in # With the PROJECT_LOGO tag one can specify a logo or icon that is included in
# the documentation. The maximum height of the logo should not exceed 55 pixels # the documentation. The maximum height of the logo should not exceed 55 pixels
# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo # and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
# to the output directory. # to the output directory.

View File

@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition
### Building ### Building
To build an compile the typescript sources to javascript use: To build and compile the typescript sources to javascript use:
``` ```
npm install npm install
npm run build npm run build

View File

@ -2,7 +2,7 @@
### Building ### Building
To build an compile the typescript sources to javascript use: To build and compile the typescript sources to javascript use:
``` ```
npm install npm install
npm run build npm run build

View File

@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition
### Building ### Building
To build an compile the typescript sources to javascript use: To build and compile the typescript sources to javascript use:
``` ```
npm install npm install
npm run build npm run build

View File

@ -322,7 +322,7 @@ public class CSharpModelTest {
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1); Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1);
} }
@Test(description = "convert an map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema schema = new Schema() final Schema schema = new Schema()
.description("a map model") .description("a map model")

View File

@ -238,7 +238,7 @@ public class GoModelTest {
Assert.assertEquals(cm.imports.size(), 1); Assert.assertEquals(cm.imports.size(), 1);
} }
@Test(description = "convert an map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema model = new Schema() final Schema model = new Schema()
.additionalProperties(new Schema().$ref("#/definitions/Children")) .additionalProperties(new Schema().$ref("#/definitions/Children"))

View File

@ -384,17 +384,17 @@ public class JavaModelTest {
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ApiModel", "List", "ArrayList", "Children")).size(), 4); Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ApiModel", "List", "ArrayList", "Children")).size(), 4);
} }
@Test(description = "convert an map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema schema = new Schema() final Schema schema = new Schema()
.description("an map model") .description("a map model")
.additionalProperties(new Schema().$ref("#/components/schemas/Children")); .additionalProperties(new Schema().$ref("#/components/schemas/Children"));
final DefaultCodegen codegen = new JavaClientCodegen(); final DefaultCodegen codegen = new JavaClientCodegen();
final CodegenModel cm = codegen.fromModel("sample", schema, Collections.singletonMap("sample", schema)); final CodegenModel cm = codegen.fromModel("sample", schema, Collections.singletonMap("sample", schema));
Assert.assertEquals(cm.name, "sample"); Assert.assertEquals(cm.name, "sample");
Assert.assertEquals(cm.classname, "Sample"); Assert.assertEquals(cm.classname, "Sample");
Assert.assertEquals(cm.description, "an map model"); Assert.assertEquals(cm.description, "a map model");
Assert.assertEquals(cm.vars.size(), 0); Assert.assertEquals(cm.vars.size(), 0);
Assert.assertEquals(cm.parent, "HashMap<String, Children>"); Assert.assertEquals(cm.parent, "HashMap<String, Children>");
Assert.assertEquals(cm.imports.size(), 4); Assert.assertEquals(cm.imports.size(), 4);
@ -1007,7 +1007,7 @@ public class JavaModelTest {
Assert.assertTrue(co.imports.contains("Pet")); Assert.assertTrue(co.imports.contains("Pet"));
} }
@Test(description = "convert an array schema in a ApiResponse") @Test(description = "convert an array schema in an ApiResponse")
public void arraySchemaTestInOperationResponse() { public void arraySchemaTestInOperationResponse() {
final Schema testSchema = new ArraySchema() final Schema testSchema = new ArraySchema()
.items(new Schema<>().$ref("#/components/schemas/Pet")); .items(new Schema<>().$ref("#/components/schemas/Pet"));
@ -1029,7 +1029,7 @@ public class JavaModelTest {
Assert.assertTrue(co.imports.contains("Pet")); Assert.assertTrue(co.imports.contains("Pet"));
} }
@Test(description = "convert a array of array schema") @Test(description = "convert an array of array schema")
public void arrayOfArraySchemaTest() { public void arrayOfArraySchemaTest() {
final Schema testSchema = new ObjectSchema() final Schema testSchema = new ObjectSchema()
.addProperties("pets", new ArraySchema() .addProperties("pets", new ArraySchema()
@ -1087,7 +1087,7 @@ public class JavaModelTest {
Assert.assertTrue(co.imports.contains("List")); Assert.assertTrue(co.imports.contains("List"));
} }
@Test(description = "convert a array schema in a ApiResponse") @Test(description = "convert an array schema in an ApiResponse")
public void arrayOfArraySchemaTestInOperationResponse() { public void arrayOfArraySchemaTestInOperationResponse() {
final Schema testSchema = new ArraySchema() final Schema testSchema = new ArraySchema()
.items(new ArraySchema() .items(new ArraySchema()

View File

@ -47,7 +47,7 @@ import java.util.Map;
@SuppressWarnings("static-method") @SuppressWarnings("static-method")
public class ObjcModelTest { public class ObjcModelTest {
@Test(description = "convert a model with a advanced map property") @Test(description = "convert a model with an advanced map property")
public void advancedMapPropertyTest() { public void advancedMapPropertyTest() {
final Schema model = new Schema() final Schema model = new Schema()
.description("a sample model") .description("a sample model")
@ -282,7 +282,7 @@ public class ObjcModelTest {
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("OAIChildren")).size(), 1); Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("OAIChildren")).size(), 1);
} }
@Test(description = "convert an map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema model = new Schema() final Schema model = new Schema()
.description("a map model for testing ObjC generator") .description("a map model for testing ObjC generator")

View File

@ -255,7 +255,7 @@ public class PhpModelTest {
// skip import test as import is not used by PHP codegen // skip import test as import is not used by PHP codegen
} }
@Test(description = "convert an map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema model = new Schema() final Schema model = new Schema()
.description("a map model") .description("a map model")

View File

@ -272,7 +272,7 @@ public class PythonTest {
} }
// should not start with 'null'. need help from the community to investigate further // should not start with 'null'. need help from the community to investigate further
@Test(description = "convert an map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema model = new Schema() final Schema model = new Schema()
.description("a map model") .description("a map model")

View File

@ -251,7 +251,7 @@ public class ScalaAkkaClientCodegenTest {
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2); Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2);
} }
@Test(description = "convert an map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema model = new Schema() final Schema model = new Schema()
.description("a map model") .description("a map model")

View File

@ -250,7 +250,7 @@ public class ScalaHttpClientModelTest {
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2); Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2);
} }
@Test(description = "convert an map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema model = new Schema() final Schema model = new Schema()
.description("a map model") .description("a map model")

View File

@ -92,11 +92,11 @@ public class ModelUtilsTest {
final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/unusedSchemas.yaml", null, new ParseOptions()).getOpenAPI(); final OpenAPI openAPI = new OpenAPIParser().readLocation("src/test/resources/3_0/unusedSchemas.yaml", null, new ParseOptions()).getOpenAPI();
List<String> unusedSchemas = ModelUtils.getSchemasUsedOnlyInFormParam(openAPI); List<String> unusedSchemas = ModelUtils.getSchemasUsedOnlyInFormParam(openAPI);
Assert.assertEquals(unusedSchemas.size(), 3); Assert.assertEquals(unusedSchemas.size(), 3);
//SomeObj2 is only used in a 'application/x-www-form-urlencoded' request //SomeObj2 is only used in an 'application/x-www-form-urlencoded' request
Assert.assertTrue(unusedSchemas.contains("SomeObj2"), "contains 'SomeObj2'"); Assert.assertTrue(unusedSchemas.contains("SomeObj2"), "contains 'SomeObj2'");
//SomeObj3 is only used in a 'multipart/form-data' request //SomeObj3 is only used in a 'multipart/form-data' request
Assert.assertTrue(unusedSchemas.contains("SomeObj3"), "contains 'SomeObj3'"); Assert.assertTrue(unusedSchemas.contains("SomeObj3"), "contains 'SomeObj3'");
//SomeObj7 is only used in a 'application/x-www-form-urlencoded' request (with referenced request body) //SomeObj7 is only used in an 'application/x-www-form-urlencoded' request (with referenced request body)
Assert.assertTrue(unusedSchemas.contains("SomeObj7"), "contains 'SomeObj7'"); Assert.assertTrue(unusedSchemas.contains("SomeObj7"), "contains 'SomeObj7'");
} }

View File

@ -377,7 +377,7 @@
}, },
"SampleBase": { "SampleBase": {
"type": "object", "type": "object",
"description": "This is an base class object from which other classes will derive.", "description": "This is a base class object from which other classes will derive.",
"properties": { "properties": {
"baseClassStringProp": { "baseClassStringProp": {
"type": "string" "type": "string"
@ -389,7 +389,7 @@
} }
}, },
"SampleSubClass": { "SampleSubClass": {
"description": "This is an subclass defived from the SampleBase class.", "description": "This is a subclass defived from the SampleBase class.",
"allOf": [ "allOf": [
{ {
"$ref": "#/definitions/SampleBase" "$ref": "#/definitions/SampleBase"
@ -423,7 +423,7 @@
} }
}, },
"PersonCard": { "PersonCard": {
"description": "This is an card object for a Person derived from BaseCard.", "description": "This is a card object for a Person derived from BaseCard.",
"x-unit-tests": ["B45"], "x-unit-tests": ["B45"],
"allOf": [ "allOf": [
{ {
@ -443,7 +443,7 @@
] ]
}, },
"PlaceCard": { "PlaceCard": {
"description": "This is an card object for a Person derived from BaseCard.", "description": "This is a card object for a Person derived from BaseCard.",
"x-unit-tests": ["B45"], "x-unit-tests": ["B45"],
"allOf": [ "allOf": [
{ {

View File

@ -2,7 +2,7 @@
### Building ### Building
To build an compile the typescript sources to javascript use: To build and compile the typescript sources to javascript use:
``` ```
npm install npm install
npm run build npm run build
@ -41,4 +41,4 @@ import { BASE_PATH } from './path-to-swagger-gen-service/index';
bootstrap(AppComponent, [ bootstrap(AppComponent, [
{ provide: BASE_PATH, useValue: 'https://your-web-service.com' }, { provide: BASE_PATH, useValue: 'https://your-web-service.com' },
]); ]);
``` ```

View File

@ -2,7 +2,7 @@
### Building ### Building
To build an compile the typescript sources to javascript use: To build and compile the typescript sources to javascript use:
``` ```
npm install npm install
npm run build npm run build
@ -41,4 +41,4 @@ import { BASE_PATH } from './path-to-swagger-gen-service/index';
bootstrap(AppComponent, [ bootstrap(AppComponent, [
{ provide: BASE_PATH, useValue: 'https://your-web-service.com' }, { provide: BASE_PATH, useValue: 'https://your-web-service.com' },
]); ]);
``` ```

View File

@ -2,7 +2,7 @@
### Building ### Building
To build an compile the typescript sources to javascript use: To build and compile the typescript sources to javascript use:
``` ```
npm install npm install
npm run build npm run build
@ -41,4 +41,4 @@ import { BASE_PATH } from './path-to-swagger-gen-service/index';
bootstrap(AppComponent, [ bootstrap(AppComponent, [
{ provide: BASE_PATH, useValue: 'https://your-web-service.com' }, { provide: BASE_PATH, useValue: 'https://your-web-service.com' },
]); ]);
``` ```

View File

@ -13,7 +13,7 @@ build:
- mvn --quiet clean install - mvn --quiet clean install
# ensure all modifications created by 'mature' generators are in the git repo # ensure all modifications created by 'mature' generators are in the git repo
- ./bin/utils/ensure-up-to-date - ./bin/utils/ensure-up-to-date
# prepare enviroment for tests # prepare environment for tests
- sudo apt-get update -qq - sudo apt-get update -qq
# install stack # install stack
- curl -sSL https://get.haskellstack.org/ | sh - curl -sSL https://get.haskellstack.org/ | sh